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

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

Issue 7351003: Clean up users of a deprecated base::LaunchApp API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win-only Created 9 years, 5 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) 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/browser/service/service_process_control.h" 5 #include "chrome/browser/service/service_process_control.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // If the service process is not launched yet then check again in 2 seconds. 305 // If the service process is not launched yet then check again in 2 seconds.
306 const int kDetectLaunchRetry = 2000; 306 const int kDetectLaunchRetry = 2000;
307 MessageLoop::current()->PostDelayedTask( 307 MessageLoop::current()->PostDelayedTask(
308 FROM_HERE, 308 FROM_HERE,
309 NewRunnableMethod(this, &Launcher::DoDetectLaunched), 309 NewRunnableMethod(this, &Launcher::DoDetectLaunched),
310 kDetectLaunchRetry); 310 kDetectLaunchRetry);
311 } 311 }
312 312
313 void ServiceProcessControl::Launcher::DoRun() { 313 void ServiceProcessControl::Launcher::DoRun() {
314 DCHECK(notify_task_.get()); 314 DCHECK(notify_task_.get());
315 if (base::LaunchApp(*cmd_line_, false, true, NULL)) { 315 base::LaunchOptions options;
316 #if defined(OS_WIN)
317 options.start_hidden = true;
318 #endif
319 if (base::LaunchProcess(*cmd_line_, options)) {
316 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 320 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
317 NewRunnableMethod(this, 321 NewRunnableMethod(this,
318 &Launcher::DoDetectLaunched)); 322 &Launcher::DoDetectLaunched));
319 } else { 323 } else {
320 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 324 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
321 NewRunnableMethod(this, &Launcher::Notify)); 325 NewRunnableMethod(this, &Launcher::Notify));
322 } 326 }
323 } 327 }
324 #endif // !OS_MACOSX 328 #endif // !OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_test.cc ('k') | chrome/installer/util/google_chrome_distribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698