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

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

Issue 7377012: Change base::LaunchProcess API slightly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/shell_integration_linux.cc ('k') | chrome/common/launchd_mac.mm » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 found = true; 68 found = true;
69 break; 69 break;
70 } 70 }
71 } 71 }
72 if (!found) 72 if (!found)
73 return false; 73 return false;
74 std::vector<std::string> argv; 74 std::vector<std::string> argv;
75 for (size_t i = 0; command[i]; ++i) 75 for (size_t i = 0; command[i]; ++i)
76 argv.push_back(command[i]); 76 argv.push_back(command[i]);
77 base::ProcessHandle handle; 77 base::ProcessHandle handle;
78 base::LaunchOptions options; 78 if (!base::LaunchProcess(argv, base::LaunchOptions(), &handle)) {
79 options.process_handle = &handle;
80 if (!base::LaunchProcess(argv, options)) {
81 LOG(ERROR) << "StartProxyConfigUtil failed to start " << command[0]; 79 LOG(ERROR) << "StartProxyConfigUtil failed to start " << command[0];
82 return false; 80 return false;
83 } 81 }
84 ProcessWatcher::EnsureProcessGetsReaped(handle); 82 ProcessWatcher::EnsureProcessGetsReaped(handle);
85 return true; 83 return true;
86 } 84 }
87 85
88 // Detect, and if possible, start the appropriate proxy config utility. On 86 // Detect, and if possible, start the appropriate proxy config utility. On
89 // failure to do so, show the Linux proxy config URL in a new tab instead. 87 // failure to do so, show the Linux proxy config URL in a new tab instead.
90 void DetectAndStartProxyConfigUtil(TabContents* tab_contents) { 88 void DetectAndStartProxyConfigUtil(TabContents* tab_contents) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 127
130 } // anonymous namespace 128 } // anonymous namespace
131 129
132 void AdvancedOptionsUtilities::ShowNetworkProxySettings( 130 void AdvancedOptionsUtilities::ShowNetworkProxySettings(
133 TabContents* tab_contents) { 131 TabContents* tab_contents) {
134 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 132 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
135 NewRunnableFunction(&DetectAndStartProxyConfigUtil, tab_contents)); 133 NewRunnableFunction(&DetectAndStartProxyConfigUtil, tab_contents));
136 } 134 }
137 135
138 #endif // !defined(OS_CHROMEOS) 136 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/common/launchd_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698