summaryrefslogtreecommitdiffstats
path: root/chrome/service/service_main.cc
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-22 05:19:29 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-22 05:19:29 +0000
commit4130d9e2ee756e06aae9861eb4658b0578ee67bd (patch)
tree18d47b0dac25e8bf76783ce524d37b21dc9bcbe1 /chrome/service/service_main.cc
parent9b8dea2472f7df4036f07f370ab4321f24823c8c (diff)
downloadchromium_src-4130d9e2ee756e06aae9861eb4658b0578ee67bd.zip
chromium_src-4130d9e2ee756e06aae9861eb4658b0578ee67bd.tar.gz
chromium_src-4130d9e2ee756e06aae9861eb4658b0578ee67bd.tar.bz2
Getting service process on Mac to handle having things moved/changed underneath it.
BUG=74983 TEST=See http://code.google.com/p/chromium/issues/detail?id=74983#c16 Review URL: http://codereview.chromium.org/6660001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/service_main.cc')
-rw-r--r--chrome/service/service_main.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/service/service_main.cc b/chrome/service/service_main.cc
index b87f510..44b0de7 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";