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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 (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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/service_process/service_process_control.h ('k') | chrome/browser/services/gcm/gcm_profile_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698