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

Unified Diff: tools/telemetry/telemetry/internal/util/path.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: tools/telemetry/telemetry/internal/util/path.py
diff --git a/tools/telemetry/telemetry/internal/util/path.py b/tools/telemetry/telemetry/internal/util/path.py
deleted file mode 100644
index 3f454c09d197b0c05fa7e9a4d15a3a275f31dc6c..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/util/path.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-
-from telemetry.core import util
-from catapult_base import util as catapult_util # pylint: disable=import-error
-
-# TODO(aiolos): Move these functions to catapult_base or here.
-GetBaseDir = util.GetBaseDir
-GetTelemetryDir = util.GetTelemetryDir
-GetUnittestDataDir = util.GetUnittestDataDir
-GetChromiumSrcDir = util.GetChromiumSrcDir
-GetBuildDirectories = util.GetBuildDirectories
-
-IsExecutable = catapult_util.IsExecutable
-
-
-def FindInstalledWindowsApplication(application_path):
- """Search common Windows installation directories for an application.
-
- Args:
- application_path: Path to application relative from installation location.
- Returns:
- A string representing the full path, or None if not found.
- """
- search_paths = [os.getenv('PROGRAMFILES(X86)'),
- os.getenv('PROGRAMFILES'),
- os.getenv('LOCALAPPDATA')]
- search_paths += os.getenv('PATH', '').split(os.pathsep)
-
- for search_path in search_paths:
- if not search_path:
- continue
- path = os.path.join(search_path, application_path)
- if IsExecutable(path):
- return path
-
- return None
-
-
-def IsSubpath(subpath, superpath):
- """Returns True iff subpath is or is in superpath."""
- subpath = os.path.realpath(subpath)
- superpath = os.path.realpath(superpath)
-
- while len(subpath) >= len(superpath):
- if subpath == superpath:
- return True
- subpath = os.path.split(subpath)[0]
- return False
-
-
-def ListFiles(base_directory, should_include_dir=lambda _: True,
- should_include_file=lambda _: True):
- matching_files = []
- for root, dirs, files in os.walk(base_directory):
- dirs[:] = [dir_name for dir_name in dirs if should_include_dir(dir_name)]
- matching_files += [os.path.join(root, file_name)
- for file_name in files if should_include_file(file_name)]
- return sorted(matching_files)
« no previous file with comments | « tools/telemetry/telemetry/internal/util/global_hooks.py ('k') | tools/telemetry/telemetry/internal/util/path_set.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698