Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / tools / telemetry / telemetry / core / platform / platform_backend.py
index fca9577..74bbf8b 100644 (file)
@@ -6,6 +6,27 @@ import time
 
 # pylint: disable=W0613
 
+
+# pylint: disable=W0212
+class OSVersion(str):
+  def __new__(cls, friendly_name, sortable_name, *args, **kwargs):
+    version = str.__new__(cls, friendly_name)
+    version._sortable_name = sortable_name
+    return version
+
+  def __lt__(self, other):
+    return self._sortable_name < other._sortable_name
+
+  def __gt__(self, other):
+    return self._sortable_name > other._sortable_name
+
+  def __le__(self, other):
+    return self._sortable_name <= other._sortable_name
+
+  def __ge__(self, other):
+    return self._sortable_name >= other._sortable_name
+
+
 class PlatformBackend(object):
   def IsRawDisplayFrameRateSupported(self):
     return False
@@ -34,6 +55,9 @@ class PlatformBackend(object):
   def GetSystemCommitCharge(self):
     raise NotImplementedError()
 
+  def GetSystemTotalPhysicalMemory(self):
+    raise NotImplementedError()
+
   def GetCpuStats(self, pid):
     return {}
 
@@ -59,7 +83,7 @@ class PlatformBackend(object):
     raise NotImplementedError()
 
   def GetOSVersionName(self):
-    return None
+    raise NotImplementedError()
 
   def CanFlushIndividualFilesFromSystemCache(self):
     raise NotImplementedError()
@@ -70,7 +94,8 @@ class PlatformBackend(object):
   def FlushSystemCacheForDirectory(self, directory, ignoring=None):
     raise NotImplementedError()
 
-  def LaunchApplication(self, application, parameters=None):
+  def LaunchApplication(
+      self, application, parameters=None, elevate_privilege=False):
     raise NotImplementedError()
 
   def IsApplicationRunning(self, application):