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

Side by Side Diff: chrome/browser/ui/webui/options/advanced_options_utils_x11.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/nacl_ui.cc ('k') | chrome/browser/upload_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if !defined(OS_CHROMEOS) 5 #if !defined(OS_CHROMEOS)
6 6
7 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" 7 #include "chrome/browser/ui/webui/options/advanced_options_utils.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 std::string path; 75 std::string path;
76 if (!env->GetVar("PATH", &path)) { 76 if (!env->GetVar("PATH", &path)) {
77 LOG(ERROR) << "No $PATH variable. Assuming no " << command[0] << "."; 77 LOG(ERROR) << "No $PATH variable. Assuming no " << command[0] << ".";
78 return false; 78 return false;
79 } 79 }
80 std::vector<std::string> paths; 80 std::vector<std::string> paths;
81 Tokenize(path, ":", &paths); 81 Tokenize(path, ":", &paths);
82 bool found = false; 82 bool found = false;
83 for (size_t i = 0; i < paths.size(); ++i) { 83 for (size_t i = 0; i < paths.size(); ++i) {
84 base::FilePath file(paths[i]); 84 base::FilePath file(paths[i]);
85 if (file_util::PathExists(file.Append(command[0]))) { 85 if (base::PathExists(file.Append(command[0]))) {
86 found = true; 86 found = true;
87 break; 87 break;
88 } 88 }
89 } 89 }
90 if (!found) 90 if (!found)
91 return false; 91 return false;
92 std::vector<std::string> argv; 92 std::vector<std::string> argv;
93 for (size_t i = 0; command[i]; ++i) 93 for (size_t i = 0; command[i]; ++i)
94 argv.push_back(command[i]); 94 argv.push_back(command[i]);
95 base::ProcessHandle handle; 95 base::ProcessHandle handle;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 WebContents* web_contents) { 150 WebContents* web_contents) {
151 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 151 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
152 base::Bind(&DetectAndStartProxyConfigUtil, 152 base::Bind(&DetectAndStartProxyConfigUtil,
153 web_contents->GetRenderProcessHost()->GetID(), 153 web_contents->GetRenderProcessHost()->GetID(),
154 web_contents->GetRenderViewHost()->GetRoutingID())); 154 web_contents->GetRenderViewHost()->GetRoutingID()));
155 } 155 }
156 156
157 } // namespace options 157 } // namespace options
158 158
159 #endif // !defined(OS_CHROMEOS) 159 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/nacl_ui.cc ('k') | chrome/browser/upload_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698