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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py

Issue 412553006: [telemetry] Add util.path module and util.path.FindInstalledWindowsApplication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test. Created 6 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 | « no previous file | tools/telemetry/telemetry/core/backends/chrome/desktop_browser_finder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py b/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py
index 674815c498b79974748f83542c09fa111c682557..07c28bf0c66884b7603b15c54e183966b8818099 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_backend.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import distutils
import glob
import heapq
import logging
@@ -18,6 +17,7 @@ from telemetry.core import exceptions
from telemetry.core import util
from telemetry.core.backends import browser_backend
from telemetry.core.backends.chrome import chrome_browser_backend
+from telemetry.util import path
from telemetry.util import support_binaries
@@ -107,11 +107,7 @@ class DesktopBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
'--pipe-name=%s' % self._GetCrashServicePipeName()])
def _GetCdbPath(self):
- search_paths = [os.getenv('PROGRAMFILES(X86)', ''),
- os.getenv('PROGRAMFILES', ''),
- os.getenv('LOCALAPPDATA', ''),
- os.getenv('PATH', '')]
- possible_paths = [
+ possible_paths = (
'Debugging Tools For Windows',
'Debugging Tools For Windows (x86)',
'Debugging Tools For Windows (x64)',
@@ -121,13 +117,12 @@ class DesktopBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
'x86'),
os.path.join('win_toolchain', 'vs2013_files', 'win8sdk', 'Debuggers',
'x64'),
- ]
+ )
for possible_path in possible_paths:
- path = distutils.spawn.find_executable(
- os.path.join(possible_path, 'cdb'),
- path=os.pathsep.join(search_paths))
- if path:
- return path
+ app_path = os.path.join(possible_path, 'cdb')
+ app_path = path.FindInstalledWindowsApplication(app_path)
+ if app_path:
+ return app_path
return None
def HasBrowserFinishedLaunching(self):
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/chrome/desktop_browser_finder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698