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

Unified Diff: tools/gn/setup.cc

Issue 63153003: mac: Prepare for -Wunused-functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | « tools/gn/parser.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/setup.cc
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index 47a243ace6da2558ac048af0dbb4c9923aa1d92c..ae02bf153b7e3a32b1f85259b3d23021b517bc80 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -99,6 +99,7 @@ base::FilePath FindDotFile(const base::FilePath& current_dir) {
return FindDotFile(up_one_dir);
}
+#if defined(OS_WIN)
// Searches the list of strings, and returns the FilePat corresponding to the
// one ending in the given substring, or the empty path if none match.
base::FilePath GetPathEndingIn(
@@ -111,13 +112,12 @@ base::FilePath GetPathEndingIn(
return base::FilePath();
}
-// Fins the depot tools directory in the path environment variable and returns
+// Finds the depot tools directory in the path environment variable and returns
// its value. Returns an empty file path if not found.
//
// We detect the depot_tools path by looking for a directory with depot_tools
// at the end (optionally followed by a separator).
base::FilePath ExtractDepotToolsFromPath() {
-#if defined(OS_WIN)
static const wchar_t kPathVarName[] = L"Path";
DWORD env_buf_size = GetEnvironmentVariable(kPathVarName, NULL, 0);
if (env_buf_size == 0)
@@ -132,17 +132,6 @@ base::FilePath ExtractDepotToolsFromPath() {
base::SplitString(path, ';', &components);
base::string16 ending_in1 = L"depot_tools\\";
-#else
- static const char kPathVarName[] = "PATH";
- const char* path = getenv(kPathVarName);
- if (!path)
- return base::FilePath();
-
- std::vector<std::string> components;
- base::SplitString(path, ':', &components);
-
- std::string ending_in1 = "depot_tools/";
-#endif
base::FilePath::StringType ending_in2 = FILE_PATH_LITERAL("depot_tools");
base::FilePath found = GetPathEndingIn(components, ending_in1);
@@ -150,6 +139,7 @@ base::FilePath ExtractDepotToolsFromPath() {
return found;
return GetPathEndingIn(components, ending_in2);
}
+#endif
} // namespace
« no previous file with comments | « tools/gn/parser.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698