OLD | NEW |
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 #include "chrome/service/cloud_print/cloud_print_proxy.h" | 5 #include "chrome/service/cloud_print/cloud_print_proxy.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 CommandLine cmd_line(exe_path); | 32 CommandLine cmd_line(exe_path); |
33 | 33 |
34 const CommandLine& process_command_line = *CommandLine::ForCurrentProcess(); | 34 const CommandLine& process_command_line = *CommandLine::ForCurrentProcess(); |
35 FilePath user_data_dir = | 35 FilePath user_data_dir = |
36 process_command_line.GetSwitchValuePath(switches::kUserDataDir); | 36 process_command_line.GetSwitchValuePath(switches::kUserDataDir); |
37 if (!user_data_dir.empty()) | 37 if (!user_data_dir.empty()) |
38 cmd_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir); | 38 cmd_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir); |
39 cmd_line.AppendSwitch(switches::kNotifyCloudPrintTokenExpired); | 39 cmd_line.AppendSwitch(switches::kNotifyCloudPrintTokenExpired); |
40 | 40 |
41 base::LaunchApp(cmd_line, false, false, NULL); | 41 base::LaunchOptions options; |
| 42 base::LaunchProcess(cmd_line, options); |
42 } | 43 } |
43 | 44 |
44 CloudPrintProxy::CloudPrintProxy() | 45 CloudPrintProxy::CloudPrintProxy() |
45 : service_prefs_(NULL), | 46 : service_prefs_(NULL), |
46 client_(NULL), | 47 client_(NULL), |
47 enabled_(false) { | 48 enabled_(false) { |
48 } | 49 } |
49 | 50 |
50 CloudPrintProxy::~CloudPrintProxy() { | 51 CloudPrintProxy::~CloudPrintProxy() { |
51 DCHECK(CalledOnValidThread()); | 52 DCHECK(CalledOnValidThread()); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 238 } |
238 } | 239 } |
239 | 240 |
240 void CloudPrintProxy::Shutdown() { | 241 void CloudPrintProxy::Shutdown() { |
241 DCHECK(CalledOnValidThread()); | 242 DCHECK(CalledOnValidThread()); |
242 if (backend_.get()) | 243 if (backend_.get()) |
243 backend_->Shutdown(); | 244 backend_->Shutdown(); |
244 backend_.reset(); | 245 backend_.reset(); |
245 } | 246 } |
246 | 247 |
OLD | NEW |