OLD | NEW |
---|---|
(Empty) | |
1 # Copyright (c) 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. | |
4 | |
5 import sys | |
6 | |
7 from telemetry.core.platform import linux_platform_backend | |
8 from telemetry.core.platform import mac_platform_backend | |
9 from telemetry.core.platform import win_platform_backend | |
10 | |
11 | |
12 def CreatePlatformBackendForCurrentOS(): | |
tonyg
2013/07/31 20:59:33
Maybe this should go in platform/__init__.py inste
chrisgao (Use stgao instead)
2013/08/01 00:36:44
Done in https://codereview.chromium.org/21406004/.
| |
13 if sys.platform.startswith('linux'): | |
14 return linux_platform_backend.LinuxPlatformBackend() | |
15 elif sys.platform == 'darwin': | |
16 return mac_platform_backend.MacPlatformBackend() | |
17 elif sys.platform == 'win32': | |
18 return win_platform_backend.WinPlatformBackend() | |
19 else: | |
20 raise NotImplementedError() | |
OLD | NEW |