chrome/test/enterprise/e2e/infra/chrome_ent_test_case.py
def RemovePolicy(self, instance_name, policy_name):
    """Removes a Google Chrome policy in registry.
    Args:
      policy_name: the policy name.
    """
    segments = policy_name.split('\\')
    policy_name = segments[-1]

    keys = [
        r'HKLM\Software\Policies\Google\Chrome',
        r'HKLM\Software\Policies\Chromium'
    ]
    for key in keys:
      if len(segments) >= 2:
        key += '\\' + '\\'.join(segments[:-1])

      cmd = (r"Remove-GPRegistryValue -Name 'Default Domain Policy' "
             "-Key %s -ValueName %s") % (key, policy_name)
      self.clients[instance_name].RunPowershell(cmd)
Removes a Google Chrome policy in registry.
    Args:
      policy_name: the policy name.
    
Removes a Google Chrome policy in registry.
Removes a Google Chrome policy in registry .
def RemovePolicy(self, instance_name, policy_name):
    segments = policy_name.split('\\')
    policy_name = segments[-1]
    keys = [
        r'HKLM\Software\Policies\Google\Chrome',
        r'HKLM\Software\Policies\Chromium'
    ]
    for key in keys:
      if len(segments) >= 2:
        key += '\\' + '\\'.join(segments[:-1])
      cmd = (r"Remove-GPRegistryValue -Name 'Default Domain Policy' "
             "-Key %s -ValueName %s") % (key, policy_name)
      self.clients[instance_name].RunPowershell(cmd)
def RemovePolicy ( self , instance_name , policy_name ) : segments = policy_name . split ( '\\' ) policy_name = segments [ - 1 ] keys = [ r'HKLM\Software\Policies\Google\Chrome' , r'HKLM\Software\Policies\Chromium' ] for key in keys : if len ( segments ) >= 2 : key += '\\' + '\\' . join ( segments [ : - 1 ] ) cmd = ( r"Remove-GPRegistryValue -Name 'Default Domain Policy' " "-Key %s -ValueName %s" ) % ( key , policy_name ) self . clients [ instance_name ] . RunPowershell ( cmd )
Removes a Google Chrome policy in registry.
Removes a Google Chrome policy in registry .
"""Removes a Google Chrome policy in registry.
    Args:
      policy_name: the policy name.
    """
self
instance_name
policy_name
the policy name.
the policy name .