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

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

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 93 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
94 94
95 base::Closure failure = failure_task; 95 base::Closure failure = failure_task;
96 if (!success_task.is_null()) 96 if (!success_task.is_null())
97 connect_success_tasks_.push_back(success_task); 97 connect_success_tasks_.push_back(success_task);
98 98
99 if (!failure.is_null()) 99 if (!failure.is_null())
100 connect_failure_tasks_.push_back(failure); 100 connect_failure_tasks_.push_back(failure);
101 101
102 // If we already in the process of launching, then we are done. 102 // If we already in the process of launching, then we are done.
103 if (launcher_) 103 if (launcher_.get())
104 return; 104 return;
105 105
106 // If the service process is already running then connects to it. 106 // If the service process is already running then connects to it.
107 if (CheckServiceProcessReady()) { 107 if (CheckServiceProcessReady()) {
108 ConnectInternal(); 108 ConnectInternal();
109 return; 109 return;
110 } 110 }
111 111
112 // A service process should have a different mechanism for starting, but now 112 // A service process should have a different mechanism for starting, but now
113 // we start it as if it is a child process. 113 // we start it as if it is a child process.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (base::LaunchProcess(*cmd_line_, options, NULL)) { 305 if (base::LaunchProcess(*cmd_line_, options, NULL)) {
306 BrowserThread::PostTask( 306 BrowserThread::PostTask(
307 BrowserThread::IO, FROM_HERE, 307 BrowserThread::IO, FROM_HERE,
308 base::Bind(&Launcher::DoDetectLaunched, this)); 308 base::Bind(&Launcher::DoDetectLaunched, this));
309 } else { 309 } else {
310 BrowserThread::PostTask( 310 BrowserThread::PostTask(
311 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this)); 311 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this));
312 } 312 }
313 } 313 }
314 #endif // !OS_MACOSX 314 #endif // !OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | chrome/browser/sessions/base_session_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698