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

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

Issue 2988823002: DeviceInfo into GenericSets (Closed)
Patch Set: 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
Index: tracing/tracing/value/histogram.py
diff --git a/tracing/tracing/value/histogram.py b/tracing/tracing/value/histogram.py
index b716ad435b7ba275ce87ef008baf6f6cb7bbde48..456ec1fcfa3ee936321bd8c90ce9c8612500c5f1 100644
--- a/tracing/tracing/value/histogram.py
+++ b/tracing/tracing/value/histogram.py
@@ -885,103 +885,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):

Powered by Google App Engine
This is Rietveld 408576698