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

Unified Diff: chrome/common/service_process_util_linux.cc

Issue 6591002: Removed the command line from ServiceProcessState::AddToAutoRun() and had the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/common/service_process_util_linux.cc
===================================================================
--- chrome/common/service_process_util_linux.cc (revision 75945)
+++ chrome/common/service_process_util_linux.cc (working copy)
@@ -7,9 +7,11 @@
#include <signal.h>
#include <unistd.h>
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/threading/platform_thread.h"
+#include "chrome/common/auto_start_linux.h"
#include "chrome/common/multi_process_lock.h"
namespace {
@@ -41,6 +43,13 @@
return TakeNamedLock(lock_name, waiting);
}
+std::string GetBaseDesktopName() {
+#if defined(GOOGLE_CHROME_BUILD)
+ return "google-chrome-service.desktop";
+#else // CHROMIUM_BUILD
+ return "chromium-service.desktop";
+#endif
+}
} // namespace
MultiProcessLock* TakeServiceRunningLock(bool waiting) {
@@ -68,12 +77,16 @@
return state_->initializing_lock_.get();
}
-bool ServiceProcessState::AddToAutoRun(CommandLine* cmd_line) {
- NOTIMPLEMENTED();
- return false;
+bool ServiceProcessState::AddToAutoRun() {
+ DCHECK(autorun_command_line_.get());
+ return AutoStart::AddApplication(
+ GetServiceProcessScopedName(GetBaseDesktopName()),
+ "Chrome Service",
Scott Byer 2011/02/25 18:19:24 Should be Chromium Service for non-official builds
sanjeevr 2011/02/25 18:22:55 Done.
+ autorun_command_line_->command_line_string(),
+ false);
}
bool ServiceProcessState::RemoveFromAutoRun() {
- NOTIMPLEMENTED();
- return false;
+ return AutoStart::Remove(
+ GetServiceProcessScopedName(GetBaseDesktopName()));
}

Powered by Google App Engine
This is Rietveld 408576698