Chromium Code Reviews| 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,9 @@ |
| if (parameters().ui_task == NULL && translate_manager_ != NULL) |
| translate_manager_->CleanupPendingUlrFetcher(); |
| - process_singleton_->Cleanup(); |
| + if (notify_result_ == ProcessSingleton::PROCESS_NONE) { |
|
jam
2011/09/12 17:28:10
nit: the rest of the file doesn't use brace bracke
|
| + process_singleton_->Cleanup(); |
| + } |
| // Stop all tasks that might run on WatchDogThread. |
| ThreadWatcherList::StopWatchingAll(); |