OLD | NEW |
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_process/service_process_control.h" | 5 #include "chrome/browser/service_process/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" |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 bool ServiceProcessControl::Shutdown() { | 311 bool ServiceProcessControl::Shutdown() { |
312 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 312 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
313 bool ret = Send(new ServiceMsg_Shutdown()); | 313 bool ret = Send(new ServiceMsg_Shutdown()); |
314 channel_.reset(); | 314 channel_.reset(); |
315 return ret; | 315 return ret; |
316 } | 316 } |
317 | 317 |
318 // static | 318 // static |
319 ServiceProcessControl* ServiceProcessControl::GetInstance() { | 319 ServiceProcessControl* ServiceProcessControl::GetInstance() { |
320 return Singleton<ServiceProcessControl>::get(); | 320 return base::Singleton<ServiceProcessControl>::get(); |
321 } | 321 } |
322 | 322 |
323 ServiceProcessControl::Launcher::Launcher( | 323 ServiceProcessControl::Launcher::Launcher( |
324 scoped_ptr<base::CommandLine> cmd_line) | 324 scoped_ptr<base::CommandLine> cmd_line) |
325 : cmd_line_(cmd_line.Pass()), | 325 : cmd_line_(cmd_line.Pass()), |
326 launched_(false), | 326 launched_(false), |
327 retry_count_(0) { | 327 retry_count_(0) { |
328 } | 328 } |
329 | 329 |
330 // Execute the command line to start the process asynchronously. | 330 // Execute the command line to start the process asynchronously. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 if (process_.IsValid()) { | 382 if (process_.IsValid()) { |
383 BrowserThread::PostTask( | 383 BrowserThread::PostTask( |
384 BrowserThread::IO, FROM_HERE, | 384 BrowserThread::IO, FROM_HERE, |
385 base::Bind(&Launcher::DoDetectLaunched, this)); | 385 base::Bind(&Launcher::DoDetectLaunched, this)); |
386 } else { | 386 } else { |
387 BrowserThread::PostTask( | 387 BrowserThread::PostTask( |
388 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this)); | 388 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this)); |
389 } | 389 } |
390 } | 390 } |
391 #endif // !OS_MACOSX | 391 #endif // !OS_MACOSX |
OLD | NEW |