1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 from telemetry import decorators
6 from telemetry.core import camel_case
7 from telemetry.core import system_info
8 from telemetry.core.backends.chrome import websocket_browser_connection
11 class SystemInfoBackend(object):
12 def __init__(self, devtools_port):
13 self._conn = websocket_browser_connection.WebSocketBrowserConnection(
17 def GetSystemInfo(self, timeout=10):
18 req = {'method': 'SystemInfo.getInfo'}
20 res = self._conn.SyncRequest(req, timeout)
25 return system_info.SystemInfo.FromDict(
26 camel_case.ToUnderscore(res['result']))