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

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

Issue 864163003: Rename base::Process::pid() to Pid() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::Process process = base::LaunchProcess(argv, base::LaunchOptions()); 95 base::Process process = base::LaunchProcess(argv, base::LaunchOptions());
96 if (!process.IsValid()) { 96 if (!process.IsValid()) {
97 LOG(ERROR) << "StartProxyConfigUtil failed to start " << command[0]; 97 LOG(ERROR) << "StartProxyConfigUtil failed to start " << command[0];
98 return false; 98 return false;
99 } 99 }
100 base::EnsureProcessGetsReaped(process.pid()); 100 base::EnsureProcessGetsReaped(process.Pid());
101 return true; 101 return true;
102 } 102 }
103 103
104 // Detect, and if possible, start the appropriate proxy config utility. On 104 // Detect, and if possible, start the appropriate proxy config utility. On
105 // failure to do so, show the Linux proxy config URL in a new tab instead. 105 // failure to do so, show the Linux proxy config URL in a new tab instead.
106 void DetectAndStartProxyConfigUtil(int render_process_id, 106 void DetectAndStartProxyConfigUtil(int render_process_id,
107 int render_view_id) { 107 int render_view_id) {
108 DCHECK_CURRENTLY_ON(BrowserThread::FILE); 108 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
109 scoped_ptr<base::Environment> env(base::Environment::Create()); 109 scoped_ptr<base::Environment> env(base::Environment::Create());
110 110
(...skipping 39 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

Powered by Google App Engine
This is Rietveld 408576698