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

Unified Diff: telemetry/telemetry/internal/platform/system_info.py

Issue 2871803002: Expose browser command line via SystemInfo. (Closed)
Patch Set: Update FakeSystemInfo to new API. Created 3 years, 7 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 | « telemetry/telemetry/internal/browser/browser.py ('k') | telemetry/telemetry/testing/fakes/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/platform/system_info.py
diff --git a/telemetry/telemetry/internal/platform/system_info.py b/telemetry/telemetry/internal/platform/system_info.py
index 09d5171e7fa78177a46db8040201a3e7dfbe0c22..19eb24c45790d24868d479343492fe86426ba8b4 100644
--- a/telemetry/telemetry/internal/platform/system_info.py
+++ b/telemetry/telemetry/internal/platform/system_info.py
@@ -7,11 +7,12 @@ from telemetry.internal.platform import gpu_info
class SystemInfo(object):
"""Provides low-level system information."""
- def __init__(self, model_name, gpu_dict):
+ def __init__(self, model_name, gpu_dict, command_line):
if (model_name == None) or (gpu_dict == None):
raise Exception("Missing model_name or gpu_dict argument")
self._model_name = model_name
self._gpu = gpu_info.GPUInfo.FromDict(gpu_dict)
+ self._command_line = command_line
@classmethod
def FromDict(cls, attrs):
@@ -27,7 +28,7 @@ class SystemInfo(object):
model_version = attrs.get('model_version', '')
if model_name and model_version:
model_name += ' ' + model_version
- return cls(model_name, attrs["gpu"])
+ return cls(model_name, attrs["gpu"], attrs.get('command_line', ''))
@property
def model_name(self):
@@ -43,3 +44,8 @@ class SystemInfo(object):
def gpu(self):
"""A GPUInfo object describing the graphics processor(s) on the system."""
return self._gpu
+
+ @property
+ def command_line(self):
+ """A string containing the command line used to launch the browser."""
+ return self._command_line
« no previous file with comments | « telemetry/telemetry/internal/browser/browser.py ('k') | telemetry/telemetry/testing/fakes/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698