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

Side by Side Diff: chrome/browser/service/service_process_control.cc

Issue 14863003: Allow cloud print connector to use test gaia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « no previous file | chrome/service/cloud_print/cloud_print_auth.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 #include "chrome/browser/service/service_process_control.h" 5 #include "chrome/browser/service/service_process_control.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/process_util.h" 11 #include "base/process_util.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
14 #include "base/threading/thread_restrictions.h" 14 #include "base/threading/thread_restrictions.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/upgrade_detector.h" 16 #include "chrome/browser/upgrade_detector.h"
17 #include "chrome/common/chrome_notification_types.h" 17 #include "chrome/common/chrome_notification_types.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/service_messages.h" 19 #include "chrome/common/service_messages.h"
20 #include "chrome/common/service_process_util.h" 20 #include "chrome/common/service_process_util.h"
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 #include "content/public/browser/notification_service.h" 22 #include "content/public/browser/notification_service.h"
23 #include "content/public/common/child_process_host.h" 23 #include "content/public/common/child_process_host.h"
24 #include "google_apis/gaia/gaia_switches.h"
24 #include "ui/base/ui_base_switches.h" 25 #include "ui/base/ui_base_switches.h"
25 26
26 using content::BrowserThread; 27 using content::BrowserThread;
27 using content::ChildProcessHost; 28 using content::ChildProcessHost;
28 29
29 // ServiceProcessControl implementation. 30 // ServiceProcessControl implementation.
30 ServiceProcessControl::ServiceProcessControl() { 31 ServiceProcessControl::ServiceProcessControl() {
31 } 32 }
32 33
33 ServiceProcessControl::~ServiceProcessControl() { 34 ServiceProcessControl::~ServiceProcessControl() {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 NOTREACHED() << "Unable to get service process binary name."; 123 NOTREACHED() << "Unable to get service process binary name.";
123 124
124 CommandLine* cmd_line = new CommandLine(exe_path); 125 CommandLine* cmd_line = new CommandLine(exe_path);
125 cmd_line->AppendSwitchASCII(switches::kProcessType, 126 cmd_line->AppendSwitchASCII(switches::kProcessType,
126 switches::kServiceProcess); 127 switches::kServiceProcess);
127 128
128 static const char* const kSwitchesToCopy[] = { 129 static const char* const kSwitchesToCopy[] = {
129 switches::kCloudPrintServiceURL, 130 switches::kCloudPrintServiceURL,
130 switches::kCloudPrintSetupProxy, 131 switches::kCloudPrintSetupProxy,
131 switches::kEnableLogging, 132 switches::kEnableLogging,
133 switches::kIgnoreUrlFetcherCertRequests,
132 switches::kLang, 134 switches::kLang,
133 switches::kLoggingLevel, 135 switches::kLoggingLevel,
136 switches::kLsoHost,
134 switches::kNoServiceAutorun, 137 switches::kNoServiceAutorun,
135 switches::kUserDataDir, 138 switches::kUserDataDir,
136 switches::kV, 139 switches::kV,
137 switches::kVModule, 140 switches::kVModule,
138 switches::kWaitForDebugger, 141 switches::kWaitForDebugger,
139 }; 142 };
140 cmd_line->CopySwitchesFrom(*CommandLine::ForCurrentProcess(), 143 cmd_line->CopySwitchesFrom(*CommandLine::ForCurrentProcess(),
141 kSwitchesToCopy, 144 kSwitchesToCopy,
142 arraysize(kSwitchesToCopy)); 145 arraysize(kSwitchesToCopy));
143 146
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (base::LaunchProcess(*cmd_line_, options, NULL)) { 305 if (base::LaunchProcess(*cmd_line_, options, NULL)) {
303 BrowserThread::PostTask( 306 BrowserThread::PostTask(
304 BrowserThread::IO, FROM_HERE, 307 BrowserThread::IO, FROM_HERE,
305 base::Bind(&Launcher::DoDetectLaunched, this)); 308 base::Bind(&Launcher::DoDetectLaunched, this));
306 } else { 309 } else {
307 BrowserThread::PostTask( 310 BrowserThread::PostTask(
308 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this)); 311 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this));
309 } 312 }
310 } 313 }
311 #endif // !OS_MACOSX 314 #endif // !OS_MACOSX
OLDNEW
« no previous file with comments | « no previous file | chrome/service/cloud_print/cloud_print_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698