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

Unified Diff: chrome/service/service_process.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: fixed up phajdan's comments, got things working properly 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
Index: chrome/service/service_process.cc
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index 13359363c41a9ed7f47ab9f50e05b57b301f7fec..0e28519c1fbb60617c787ebb31018bdaab251af0 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -5,6 +5,7 @@
#include "chrome/service/service_process.h"
#include <algorithm>
+#include <syslog.h>
Mark Mentovai 2011/03/11 20:13:52 ?
#include "base/basictypes.h"
#include "base/command_line.h"
@@ -320,7 +321,10 @@ void ServiceProcess::OnServiceEnabled() {
if ((1 == enabled_services_) &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kNoServiceAutorun)) {
- ServiceProcessState::GetInstance()->AddToAutoRun();
+ if (!ServiceProcessState::GetInstance()->AddToAutoRun()) {
+ // TODO(scottbyer/sanjeevr/dmaclach): Handle error condition
+ LOG(ERROR) << "Unable to AddToAutoRun";
+ }
}
}
@@ -328,7 +332,10 @@ void ServiceProcess::OnServiceDisabled() {
DCHECK_NE(enabled_services_, 0);
enabled_services_--;
if (0 == enabled_services_) {
- ServiceProcessState::GetInstance()->RemoveFromAutoRun();
+ if (!ServiceProcessState::GetInstance()->RemoveFromAutoRun()) {
+ // TODO(scottbyer/sanjeevr/dmaclach): Handle error condition
+ LOG(ERROR) << "Unable to RemoveFromAutoRun";
+ }
// We will wait for some time to respond to IPCs before shutting down.
ScheduleShutdownCheck();
}
« chrome/common/service_process_util_mac.mm ('K') | « chrome/common/service_process_util_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698