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

Unified Diff: tracing/tracing/value/histogram.py

Issue 2988823002: DeviceInfo into GenericSets (Closed)
Patch Set: Remove how-to-write-metrics-device image Created 3 years, 5 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 | « tracing/tracing/value/diagnostics/reserved_names.html ('k') | tracing/tracing/value/histogram_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/histogram.py
diff --git a/tracing/tracing/value/histogram.py b/tracing/tracing/value/histogram.py
index 405158ad7840df9901dc6ccf9466c9837b3221cb..e53e05a388e379e20b271268a05f207d125f9a27 100644
--- a/tracing/tracing/value/histogram.py
+++ b/tracing/tracing/value/histogram.py
@@ -886,103 +886,6 @@ class TelemetryInfo(diagnostic.Diagnostic):
return info
-class DeviceInfo(diagnostic.Diagnostic):
-
- def __init__(self):
- super(DeviceInfo, self).__init__()
- self._chrome_version = ''
- self._os_name = ''
- self._os_version = ''
- self._gpu_info = None
- self._arch = None
- self._ram = 0
-
- def __eq__(self, other):
- if self.chrome_version != other.chrome_version:
- return False
- if self.os_name != other.os_name:
- return False
- if self.os_version != other.os_version:
- return False
- if self.gpu_info != other.gpu_info:
- return False
- if self.arch != other.arch:
- return False
- if self.ram != other.ram:
- return False
- return True
-
- def __ne__(self, other):
- return not self == other
-
- @staticmethod
- def FromDict(d):
- info = DeviceInfo()
- info.chrome_version = d.get('chromeVersion', '')
- info.os_name = d.get('osName', '')
- info.os_version = d.get('osVersion', '')
- info.gpu_info = d.get('gpuInfo')
- info.arch = d.get('arch')
- info.ram = d.get('ram', 0)
- return info
-
- def _AsDictInto(self, d):
- d['chromeVersion'] = self.chrome_version
- d['osName'] = self.os_name
- d['osVersion'] = self.os_version
- d['gpuInfo'] = self.gpu_info
- d['arch'] = self.arch
- d['ram'] = self.ram
-
- @property
- def chrome_version(self):
- return self._chrome_version
-
- @chrome_version.setter
- def chrome_version(self, v):
- self._chrome_version = v
-
- @property
- def os_name(self):
- return self._os_name
-
- @os_name.setter
- def os_name(self, v):
- self._os_name = v
-
- @property
- def os_version(self):
- return self._os_version
-
- @os_version.setter
- def os_version(self, v):
- self._os_version = v
-
- @property
- def gpu_info(self):
- return self._gpu_info
-
- @gpu_info.setter
- def gpu_info(self, v):
- self._gpu_info = v
-
- @property
- def arch(self):
- return self._arch
-
- @arch.setter
- def arch(self, v):
- self._arch = v
-
- @property
- def ram(self):
- return self._ram
-
- @ram.setter
- def ram(self, v):
- self._ram = v
-
-
class RelatedEventSet(diagnostic.Diagnostic):
def __init__(self):
@@ -1747,7 +1650,6 @@ all_diagnostics.DIAGNOSTICS_BY_NAME.update({
'RelatedEventSet': RelatedEventSet,
'BuildbotInfo': BuildbotInfo,
'DateRange': DateRange,
- 'DeviceInfo': DeviceInfo,
'TagMap': TagMap,
'RelatedHistogramBreakdown': RelatedHistogramBreakdown,
'TelemetryInfo': TelemetryInfo,
« no previous file with comments | « tracing/tracing/value/diagnostics/reserved_names.html ('k') | tracing/tracing/value/histogram_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698