Index: tools/android/loading/controller.py |
diff --git a/tools/android/loading/controller.py b/tools/android/loading/controller.py |
index bbd4799ac1470b9e264b4dc3caefd8cf570c215a..cceb4c88a90f38f9a3d2ba376371a4a9b991eb3b 100644 |
--- a/tools/android/loading/controller.py |
+++ b/tools/android/loading/controller.py |
@@ -27,6 +27,7 @@ import traceback |
import psutil |
import chrome_cache |
+import chrome_setup |
import common_util |
import device_setup |
import devtools_monitor |
@@ -146,23 +147,7 @@ class ChromeControllerBase(object): |
DEVTOOLS_CONNECTION_ATTEMPT_INTERVAL_SECONDS = 1 |
def __init__(self): |
- self._chrome_args = [ |
- # Disable backgound network requests that may pollute WPR archive, |
- # pollute HTTP cache generation, and introduce noise in loading |
- # performance. |
- '--disable-background-networking', |
- '--disable-default-apps', |
- '--no-proxy-server', |
- # TODO(gabadie): Remove once crbug.com/354743 done. |
- '--safebrowsing-disable-auto-update', |
- |
- # Disables actions that chrome performs only on first run or each |
- # launches, which can interfere with page load performance, or even |
- # block its execution by waiting for user input. |
- '--disable-fre', |
- '--no-default-browser-check', |
- '--no-first-run', |
- |
+ self._chrome_args = chrome_setup.CHROME_ARGS + [ |
# Tests & dev-tools related stuff. |
'--enable-test-events', |
'--remote-debugging-port=%d' % OPTIONS.devtools_port, |
@@ -406,14 +391,9 @@ class RemoteChromeController(ChromeControllerBase): |
def ResetBrowserState(self): |
"""Override resetting Chrome local state.""" |
logging.info('Resetting Chrome local state') |
- package = OPTIONS.ChromePackage().package |
- # Remove the Chrome Profile and the various disk caches. Other parts |
- # theoretically should not affect loading performance. Also remove the tab |
- # state to prevent it from growing infinitely. [:D] |
- for directory in ['app_chrome/Default', 'cache', 'app_chrome/ShaderCache', |
- 'app_tabs']: |
- cmd = ['rm', '-rf', '/data/data/{}/{}'.format(package, directory)] |
- self._device.adb.Shell(subprocess.list2cmdline(cmd)) |
+ chrome_setup.ResetChromeLocalState(self._device, |
+ OPTIONS.ChromePackage().package) |
+ |
def RebootDevice(self): |
"""Reboot the remote device.""" |