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

Unified Diff: tools/telemetry/telemetry/core/platform/__init__.py

Issue 137143011: [Telemetry] Detect whether sudo is required for certain admin-commands. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reupload Created 6 years, 11 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 | « no previous file | tools/telemetry/telemetry/core/platform/android_platform_backend.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/__init__.py
diff --git a/tools/telemetry/telemetry/core/platform/__init__.py b/tools/telemetry/telemetry/core/platform/__init__.py
index 389104a3fde80d84d66a5ffd4b0bd654fab5fd1b..483439bf90974f98abdd2c7e83a14182cfed9582 100644
--- a/tools/telemetry/telemetry/core/platform/__init__.py
+++ b/tools/telemetry/telemetry/core/platform/__init__.py
@@ -86,7 +86,8 @@ class Platform(object):
return self._platform_backend.GetOSName()
def GetOSVersionName(self):
- """Returns a string description of the Platform OS version.
+ """Returns a logically sortable, string-like description of the Platform OS
+ version.
Examples: VISTA, WIN7, LION, MOUNTAINLION"""
return self._platform_backend.GetOSVersionName()
@@ -111,10 +112,17 @@ class Platform(object):
return self._platform_backend.FlushSystemCacheForDirectory(
directory, ignoring=ignoring)
- def LaunchApplication(self, application, parameters=None):
- """"Launchs a given application on the OS."""
- return self._platform_backend.LaunchApplication(application,
- parameters)
+ def LaunchApplication(self, application, parameters=None,
+ elevate_privilege=False):
+ """"Launches the given |application| with a list of |parameters| on the OS.
+
+ Set |elevate_privilege| to launch the application with root or admin rights.
+
+ Returns:
+ A popen style process handle for host platforms.
+ """
+ return self._platform_backend.LaunchApplication(
+ application, parameters, elevate_privilege=elevate_privilege)
def IsApplicationRunning(self, application):
"""Returns whether an application is currently running."""
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/platform/android_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698