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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/cros_interface.py

Issue 266023002: Move RestartUI to CrOSInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 8 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/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/cros_interface.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/cros_interface.py b/tools/telemetry/telemetry/core/backends/chrome/cros_interface.py
index edc6f8db86c9d194e1d5b7aaf01ef4809ee184c5..df298e4f5ff90a5f5ae271c3292c334f87caadd3 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/cros_interface.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/cros_interface.py
@@ -384,3 +384,15 @@ class CrOSInterface(object):
screenshot_file])
return
logging.warning('screenshot directory full.')
+
+ def RestartUI(self, clear_enterprise_policy):
+ logging.info('(Re)starting the ui (logs the user out)')
+ if clear_enterprise_policy:
+ self.RunCmdOnDevice(['stop', 'ui'])
+ self.RmRF('/var/lib/whitelist/*')
+ self.RmRF('/home/chronos/Local\ State')
+
+ if self.IsServiceRunning('ui'):
+ self.RunCmdOnDevice(['restart', 'ui'])
+ else:
+ self.RunCmdOnDevice(['start', 'ui'])
« no previous file with comments | « tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698