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

Unified Diff: chrome/browser/process_singleton_mac.cc

Issue 11415237: Move many ProcessSingleton methods to "protected" visibility as an upcoming refactoring of ProcessS… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on master Created 8 years, 1 month 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/browser/process_singleton_mac.cc
diff --git a/chrome/browser/process_singleton_mac.cc b/chrome/browser/process_singleton_mac.cc
index 253f36966ca028a8cac5d28ca1470c03ab282d28..76313aeb04c7c82fcb753a5c4648cd7a0317f181 100644
--- a/chrome/browser/process_singleton_mac.cc
+++ b/chrome/browser/process_singleton_mac.cc
@@ -51,17 +51,26 @@ ProcessSingleton::~ProcessSingleton() {
Cleanup();
}
-ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
- // This space intentionally left blank.
- return PROCESS_NONE;
-}
-
ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate(
const NotificationCallback& notification_callback) {
// Windows tries NotifyOtherProcess() first.
return Create(notification_callback) ? PROCESS_NONE : PROFILE_IN_USE;
}
+void ProcessSingleton::Cleanup() {
+ // Closing the file also releases the lock.
+ if (lock_fd_ != -1) {
+ int rc = HANDLE_EINTR(close(lock_fd_));
+ DPCHECK(!rc) << "Closing lock_fd_:";
+ }
+ lock_fd_ = -1;
+}
+
+ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
+ // This space intentionally left blank.
+ return PROCESS_NONE;
+}
+
// 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.
@@ -109,12 +118,3 @@ bool ProcessSingleton::Create(
return true;
}
-
-void ProcessSingleton::Cleanup() {
- // Closing the file also releases the lock.
- if (lock_fd_ != -1) {
- int rc = HANDLE_EINTR(close(lock_fd_));
- DPCHECK(!rc) << "Closing lock_fd_:";
- }
- lock_fd_ = -1;
-}

Powered by Google App Engine
This is Rietveld 408576698