summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index df15582..b777843 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -996,7 +996,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
// 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.NotifyOtherProcess()) {
+ switch (process_singleton.NotifyOtherProcessOrCreate()) {
case ProcessSingleton::PROCESS_NONE:
// No process already running, fall through to starting a new one.
break;
@@ -1011,6 +1011,14 @@ int BrowserMain(const MainFunctionParams& parameters) {
case ProcessSingleton::PROFILE_IN_USE:
return ResultCodes::PROFILE_IN_USE;
+ case ProcessSingleton::LOCK_ERROR:
+ LOG(ERROR) << "Failed to create a ProcessSingleton for your profile "
+ "directory. This means that running multiple instances "
+ "would start multiple browser processes rather than "
+ "opening a new window in the existing process. Aborting "
+ "now to avoid profile corruption.";
+ return ResultCodes::PROFILE_IN_USE;
+
default:
NOTREACHED();
}
@@ -1074,15 +1082,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
if (CheckMachineLevelInstall())
return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS;
- if (!process_singleton.Create()) {
- LOG(ERROR) << "Failed to create a ProcessSingleton for your profile "
- "directory. This means that running multiple instances "
- "would start multiple browser processes rather than opening "
- "a new window in the existing process. Aborting now to "
- "avoid profile corruption.";
- return ResultCodes::PROFILE_IN_USE;
- }
-
// Create the TranslateManager singleton.
Singleton<TranslateManager>::get();