Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3237)

Unified Diff: tools/android/loading/device_setup.py

Issue 2698703004: [flag_changer refactor] Fix usages to conform with new API (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/android/loading/controller.py ('k') | tools/cygprofile/profile_android_startup.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/device_setup.py
diff --git a/tools/android/loading/device_setup.py b/tools/android/loading/device_setup.py
index fc22bdcb59e8d7db1f6f76a7ce6dc2752fdff110..954ae09342a8a16d8c9ee3269027179b3b5ac33c 100644
--- a/tools/android/loading/device_setup.py
+++ b/tools/android/loading/device_setup.py
@@ -234,16 +234,12 @@ def _VerifySilentWprHost(record, network_condition_name):
' without a specified archive.')
-def _FormatWPRRelatedChromeArgumentFor(http_port, https_port, escape):
+def _FormatWPRRelatedChromeArgumentFor(http_port, https_port):
HOST_RULES='MAP * 127.0.0.1,EXCLUDE localhost'
- chrome_args = [
+ return [
'--testing-fixed-http-port={}'.format(http_port),
- '--testing-fixed-https-port={}'.format(https_port)]
- if escape:
- chrome_args.append('--host-resolver-rules="{}"'.format(HOST_RULES))
- else:
- chrome_args.append('--host-resolver-rules={}'.format(HOST_RULES))
- return chrome_args
+ '--testing-fixed-https-port={}'.format(https_port),
+ '--host-resolver-rules={}'.format(HOST_RULES)]
@contextlib.contextmanager
@@ -286,8 +282,7 @@ def LocalWprHost(wpr_archive_path, record=False,
disable_script_injection=disable_script_injection,
wpr_ca_cert_path=private_ca_cert_path,
out_log_path=out_log_path) as (http_port, https_port):
- chrome_args = _FormatWPRRelatedChromeArgumentFor(http_port, https_port,
- escape=False)
+ chrome_args = _FormatWPRRelatedChromeArgumentFor(http_port, https_port)
yield WprAttribute(chrome_args=chrome_args,
chrome_env_override={'HOME': temp_home_dir})
@@ -340,8 +335,7 @@ def RemoteWprHost(device, wpr_archive_path, record=False,
device_https_port = forwarder.Forwarder.DevicePortForHostPort(https_port)
try:
chrome_args = _FormatWPRRelatedChromeArgumentFor(device_http_port,
- device_https_port,
- escape=True)
+ device_https_port)
yield WprAttribute(chrome_args=chrome_args, chrome_env_override={})
finally:
# Tear down the forwarder.
« no previous file with comments | « tools/android/loading/controller.py ('k') | tools/cygprofile/profile_android_startup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698