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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 7796030: Clean the SingletonLock only if there is no previous Chromium process running. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 3 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/chrome_browser_main.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 100382)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -671,7 +671,8 @@
record_search_engine_(false),
translate_manager_(NULL),
profile_(NULL),
- run_message_loop_(true) {
+ run_message_loop_(true),
+ notify_result_(ProcessSingleton::PROCESS_NONE) {
// If we're running tests (ui_task is non-null).
if (parameters.ui_task)
browser_defaults::enable_help_app = false;
@@ -1355,7 +1356,8 @@
// new one. NotifyOtherProcess will currently give the other process up to
// 20 seconds to respond. Note that this needs to be done before we attempt
// to read the profile.
- switch (process_singleton_->NotifyOtherProcessOrCreate()) {
+ notify_result_ = process_singleton_->NotifyOtherProcessOrCreate();
+ switch (notify_result_) {
case ProcessSingleton::PROCESS_NONE:
// No process already running, fall through to starting a new one.
break;
@@ -1880,7 +1882,8 @@
if (parameters().ui_task == NULL && translate_manager_ != NULL)
translate_manager_->CleanupPendingUlrFetcher();
- process_singleton_->Cleanup();
+ if (notify_result_ == ProcessSingleton::PROCESS_NONE)
+ process_singleton_->Cleanup();
// Stop all tasks that might run on WatchDogThread.
ThreadWatcherList::StopWatchingAll();
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698