parameters: (self, finder_options)
docstring: Copies our options from finder_options
docstring_summary: Copies our options from finder_options
docstring_tokens: Copies our options from finder_options
function: def UpdateFromParseResults(self, finder_options):
      """Copies our options from finder_options"""
      browser_options_list = [
          'extra_browser_args_as_string',
          'extra_wpr_args_as_string',
          'profile_dir',
          'profile_type',
          'show_stdout',
          ]
      for o in browser_options_list:
        a = getattr(finder_options, o, None)
        if a is not None:
          setattr(self, o, a)
          delattr(finder_options, o)
  
      self.browser_type = finder_options.browser_type
      self._finder_options = finder_options
  
      if hasattr(self, 'extra_browser_args_as_string'):
        tmp = shlex.split(
          self.extra_browser_args_as_string)
        self.AppendExtraBrowserArgs(tmp)
        delattr(self, 'extra_browser_args_as_string')
      if hasattr(self, 'extra_wpr_args_as_string'):
        tmp = shlex.split(
          self.extra_wpr_args_as_string)
        self.extra_wpr_args.extend(tmp)
        delattr(self, 'extra_wpr_args_as_string')
      if self.profile_type == 'default':
        self.dont_override_profile = True
  
      if self.profile_dir and self.profile_type != 'clean':
        logging.critical(
            "It's illegal to specify both --profile-type and --profile-dir.\n"
            "For more information see: http://goo.gl/ngdGD5")
        sys.exit(1)
  
      if self.profile_dir and not os.path.isdir(self.profile_dir):
        logging.critical(
            "Directory specified by --profile-dir (%s) doesn't exist "
            "or isn't a directory.\n"
            "For more information see: http://goo.gl/ngdGD5" % self.profile_dir)
        sys.exit(1)
  
      if not self.profile_dir:
        self.profile_dir = profile_types.GetProfileDir(self.profile_type)
  
      if getattr(finder_options, 'enable_logging'):
        if getattr(finder_options, 'logging_verbosity'):
          # Both --enable-browser-logging and --browser-logging-verbosity were
          # provided (fail).
          logging.critical("It's illegal to provide both --enable-browser-logging"
                           ' and --browser-logging-verbosity.')
          sys.exit(1)
        # Only --enable-browser-logging was provided.
        self.logging_verbosity = self.VERBOSE_LOGGING
        delattr(finder_options, 'enable_logging')
      elif getattr(finder_options, 'logging_verbosity'):
        # Only --browser-logging-verbosity was provided (verbose logging).
        self.logging_verbosity = finder_options.logging_verbosity
        delattr(finder_options, 'logging_verbosity')
  
      # This deferred import is necessary because browser_options is imported in
      # telemetry/telemetry/__init__.py.
      finder_options.browser_options = CreateChromeBrowserOptions(self)
function_tokens: def UpdateFromParseResults ( self , finder_options ) : browser_options_list = [ 'extra_browser_args_as_string' , 'extra_wpr_args_as_string' , 'profile_dir' , 'profile_type' , 'show_stdout' , ] for o in browser_options_list : a = getattr ( finder_options , o , None ) if a is not None : setattr ( self , o , a ) delattr ( finder_options , o ) self . browser_type = finder_options . browser_type self . _finder_options = finder_options if hasattr ( self , 'extra_browser_args_as_string' ) : tmp = shlex . split ( self . extra_browser_args_as_string ) self . AppendExtraBrowserArgs ( tmp ) delattr ( self , 'extra_browser_args_as_string' ) if hasattr ( self , 'extra_wpr_args_as_string' ) : tmp = shlex . split ( self . extra_wpr_args_as_string ) self . extra_wpr_args . extend ( tmp ) delattr ( self , 'extra_wpr_args_as_string' ) if self . profile_type == 'default' : self . dont_override_profile = True if self . profile_dir and self . profile_type != 'clean' : logging . critical ( "It's illegal to specify both --profile-type and --profile-dir.\n" "For more information see: http://goo.gl/ngdGD5" ) sys . exit ( 1 ) if self . profile_dir and not os . path . isdir ( self . profile_dir ) : logging . critical ( "Directory specified by --profile-dir (%s) doesn't exist " "or isn't a directory.\n" "For more information see: http://goo.gl/ngdGD5" % self . profile_dir ) sys . exit ( 1 ) if not self . profile_dir : self . profile_dir = profile_types . GetProfileDir ( self . profile_type ) if getattr ( finder_options , 'enable_logging' ) : if getattr ( finder_options , 'logging_verbosity' ) : # Both --enable-browser-logging and --browser-logging-verbosity were # provided (fail). logging . critical ( "It's illegal to provide both --enable-browser-logging" ' and --browser-logging-verbosity.' ) sys . exit ( 1 ) # Only --enable-browser-logging was provided. self . logging_verbosity = self . VERBOSE_LOGGING delattr ( finder_options , 'enable_logging' ) elif getattr ( finder_options , 'logging_verbosity' ) : # Only --browser-logging-verbosity was provided (verbose logging). self . logging_verbosity = finder_options . logging_verbosity delattr ( finder_options , 'logging_verbosity' ) # This deferred import is necessary because browser_options is imported in # telemetry/telemetry/__init__.py. finder_options . browser_options = CreateChromeBrowserOptions ( self )