diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 18:47:20 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 18:47:20 +0000 |
commit | 4159e7f4840e961b69e4f9438a5858d0b3fe6e63 (patch) | |
tree | 014e23d7e937a99e6e9d98ca005622f8dfbe9935 /tools/gn/setup.cc | |
parent | 2cc986c47746f59aad961b0791fd1620ff599d70 (diff) | |
download | chromium_src-4159e7f4840e961b69e4f9438a5858d0b3fe6e63.zip chromium_src-4159e7f4840e961b69e4f9438a5858d0b3fe6e63.tar.gz chromium_src-4159e7f4840e961b69e4f9438a5858d0b3fe6e63.tar.bz2 |
mac: Prepare for -Wunused-functions.
Mostly involves deleting hundreds of lines of unused code.
BUG=315884
R=akalin@chromium.org, brettw@chromium.org, fischman@chromium.org, jamesr@chromium.org, sky@chromium.org, thestig@chromium.org
TBR=piman, youngki
Review URL: https://codereview.chromium.org/63153003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/setup.cc')
-rw-r--r-- | tools/gn/setup.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc index 47a243a..ae02bf1 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 |