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

Unified Diff: chrome/browser/process_singleton_mac.cc

Issue 9968053: Refactor ProcessSingleton so that it may be used distinctly from a full browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment nits. Created 8 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/browser/process_singleton_linux_uitest.cc ('k') | chrome/browser/process_singleton_mac_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/process_singleton_mac.cc
diff --git a/chrome/browser/process_singleton_mac.cc b/chrome/browser/process_singleton_mac.cc
index 51525a27341ed9c01f725f12bca56463731737e1..6b624791dcab6da14b5474bfaf456efc2ab28527 100644
--- a/chrome/browser/process_singleton_mac.cc
+++ b/chrome/browser/process_singleton_mac.cc
@@ -56,19 +56,23 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
return PROCESS_NONE;
}
-ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
+ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate(
+ const NotificationCallback& notification_callback) {
// Windows tries NotifyOtherProcess() first.
- return Create() ? PROCESS_NONE : PROFILE_IN_USE;
+ return Create(notification_callback) ? PROCESS_NONE : PROFILE_IN_USE;
}
// Attempt to acquire an exclusive lock on an empty file in the
// profile directory. Returns |true| if it gets the lock. Returns
// |false| if the lock is held, or if there is an error.
+// |notification_callback| is not actually used. See the comments at the top of
+// this file for details.
// TODO(shess): Rather than logging failures, popup an alert. Punting
// that for now because it would require confidence that this code is
// never called in a situation where an alert wouldn't work.
// http://crbug.com/59061
-bool ProcessSingleton::Create() {
+bool ProcessSingleton::Create(
+ const NotificationCallback& notification_callback) {
DCHECK_EQ(-1, lock_fd_) << "lock_path_ is already open.";
lock_fd_ = HANDLE_EINTR(open(lock_path_.value().c_str(),
@@ -114,7 +118,3 @@ void ProcessSingleton::Cleanup() {
}
lock_fd_ = -1;
}
-
-void ProcessSingleton::ProcessCommandLine(const CommandLine& command_line,
- const FilePath& current_directory) {
-}
« no previous file with comments | « chrome/browser/process_singleton_linux_uitest.cc ('k') | chrome/browser/process_singleton_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698