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

Unified Diff: chrome/service/service_main.cc

Issue 6660001: Getting service process on Mac to handle having things moved/changed underneath it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: polishing the chrome Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/service_process_util_win.cc ('k') | chrome/service/service_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_main.cc
diff --git a/chrome/service/service_main.cc b/chrome/service/service_main.cc
index b87f510b0df33247d7a8ea352a155f8003156de1..44b0de757a11fc17a43f746c67ea1665e32420df 100644
--- a/chrome/service/service_main.cc
+++ b/chrome/service/service_main.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -33,7 +33,8 @@ int ServiceProcessMain(const MainFunctionParams& parameters) {
base::PlatformThread::SetName("CrServiceMain");
// If there is already a service process running, quit now.
- if (!ServiceProcessState::GetInstance()->Initialize())
+ scoped_ptr<ServiceProcessState> state(new ServiceProcessState);
+ if (!state->Initialize())
return 0;
#if defined(OS_WIN)
@@ -45,7 +46,8 @@ int ServiceProcessMain(const MainFunctionParams& parameters) {
ServiceProcess service_process;
if (service_process.Initialize(&main_message_loop,
- parameters.command_line_)) {
+ parameters.command_line_,
+ state.release())) {
MessageLoop::current()->Run();
} else {
LOG(ERROR) << "Service process failed to initialize";
« no previous file with comments | « chrome/common/service_process_util_win.cc ('k') | chrome/service/service_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698