tools/cygprofile/profile_android_startup.py
def _StartForwarder(self):
    """Sets up forwarding of device ports to the host, and configures chrome
    to use those ports.
    """
    if not self._wpr_server:
      logging.warning('No host WPR server to forward to.')
      return
    print('Starting device forwarder...')
    forwarder.Forwarder.Map([(0, self._host_http_port),
                             (0, self._host_https_port)],
                            self._device)
    device_http = forwarder.Forwarder.DevicePortForHostPort(
        self._host_http_port)
    device_https = forwarder.Forwarder.DevicePortForHostPort(
        self._host_https_port)
    self._flag_changer = flag_changer.FlagChanger(
        self._device, self._cmdline_file)
    self._flag_changer.AddFlags([
        '--host-resolver-rules=MAP * 127.0.0.1,EXCLUDE localhost',
        '--testing-fixed-http-port=%s' % device_http,
        '--testing-fixed-https-port=%s' % device_https,

        # Allows to selectively avoid certificate errors in Chrome. Unlike
        # --ignore-certificate-errors this allows exercising the HTTP disk cache
        # and avoids re-establishing socket connections. The value is taken from
        # the WprGo documentation at:
        # https://github.com/catapult-project/catapult/blob/master/web_page_replay_go/README.md
        '--ignore-certificate-errors-spki-list=' +
        'PhrPvGIaAMmd29hj8BCZOq096yj7uMpRNHpn5PDxI6I=',

        # The flag --ignore-certificate-errors-spki-list (above) requires
        # specifying the profile directory, otherwise it is silently ignored.
        '--user-data-dir=/data/data/{}'.format(self._package)])
Sets up forwarding of device ports to the host, and configures chrome
    to use those ports.
    
Sets up forwarding of device ports to the host, and configures chrome
to use those ports.
Sets up forwarding of device ports to the host and configures chrome to use those ports .
def _StartForwarder(self):
    if not self._wpr_server:
      logging.warning('No host WPR server to forward to.')
      return
    print('Starting device forwarder...')
    forwarder.Forwarder.Map([(0, self._host_http_port),
                             (0, self._host_https_port)],
                            self._device)
    device_http = forwarder.Forwarder.DevicePortForHostPort(
        self._host_http_port)
    device_https = forwarder.Forwarder.DevicePortForHostPort(
        self._host_https_port)
    self._flag_changer = flag_changer.FlagChanger(
        self._device, self._cmdline_file)
    self._flag_changer.AddFlags([
        '--host-resolver-rules=MAP * 127.0.0.1,EXCLUDE localhost',
        '--testing-fixed-http-port=%s' % device_http,
        '--testing-fixed-https-port=%s' % device_https,
        '--ignore-certificate-errors-spki-list=' +
        'PhrPvGIaAMmd29hj8BCZOq096yj7uMpRNHpn5PDxI6I=',
        '--user-data-dir=/data/data/{}'.format(self._package)])
def _StartForwarder ( self ) : if not self . _wpr_server : logging . warning ( 'No host WPR server to forward to.' ) return print ( 'Starting device forwarder...' ) forwarder . Forwarder . Map ( [ ( 0 , self . _host_http_port ) , ( 0 , self . _host_https_port ) ] , self . _device ) device_http = forwarder . Forwarder . DevicePortForHostPort ( self . _host_http_port ) device_https = forwarder . Forwarder . DevicePortForHostPort ( self . _host_https_port ) self . _flag_changer = flag_changer . FlagChanger ( self . _device , self . _cmdline_file ) self . _flag_changer . AddFlags ( [ '--host-resolver-rules=MAP * 127.0.0.1,EXCLUDE localhost' , '--testing-fixed-http-port=%s' % device_http , '--testing-fixed-https-port=%s' % device_https , '--ignore-certificate-errors-spki-list=' + 'PhrPvGIaAMmd29hj8BCZOq096yj7uMpRNHpn5PDxI6I=' , '--user-data-dir=/data/data/{}' . format ( self . _package ) ] )
Sets up forwarding of device ports to the host, and configures chrome
to use those ports.
Sets up forwarding of device ports to the host and configures chrome to use those ports .
"""Sets up forwarding of device ports to the host, and configures chrome
    to use those ports.
    """ # Allows to selectively avoid certificate errors in Chrome. Unlike # --ignore-certificate-errors this allows exercising the HTTP disk cache # and avoids re-establishing socket connections. The value is taken from # the WprGo documentation at: # https://github.com/catapult-project/catapult/blob/master/web_page_replay_go/README.md # The flag --ignore-certificate-errors-spki-list (above) requires # specifying the profile directory, otherwise it is silently ignored.
self