diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-11 23:16:02 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-11 23:16:02 +0000 |
commit | 5425d069ab8c48bb28cda2cd7b746ae5e8443605 (patch) | |
tree | 79bea8fa21bd7285e121c45102fe57043419258c /chrome/browser/browser_main.cc | |
parent | b7c8da42ebb18611cb23d281a08e12b896152626 (diff) | |
download | chromium_src-5425d069ab8c48bb28cda2cd7b746ae5e8443605.zip chromium_src-5425d069ab8c48bb28cda2cd7b746ae5e8443605.tar.gz chromium_src-5425d069ab8c48bb28cda2cd7b746ae5e8443605.tar.bz2 |
Commit fix for import from dbelenko.
See http://codereview.chromium.org/1623007/
BUG= 41077
TEST= none
Review URL: http://codereview.chromium.org/1517031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44217 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 25df1a8..e5f3748 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -910,28 +910,39 @@ int BrowserMain(const MainFunctionParams& parameters) { } #endif - // When another process is running, use that process instead of starting a - // 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()) { - case ProcessSingleton::PROCESS_NONE: - // No process already running, fall through to starting a new one. - break; - - case ProcessSingleton::PROCESS_NOTIFIED: +#if !defined(OS_MACOSX) + // In environments other than Mac OS X we support import of settings + // from other browsers. In case this process is a short-lived "import" + // process that another browser runs just to import the settings, we + // don't want to be checking for another browser process, by design. + if (!parsed_command_line.HasSwitch(switches::kImport) || + parsed_command_line.HasSwitch(switches::kImportFromFile)) { +#endif + // When another process is running, use that process instead of starting a + // 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()) { + case ProcessSingleton::PROCESS_NONE: + // No process already running, fall through to starting a new one. + break; + + case ProcessSingleton::PROCESS_NOTIFIED: #if defined(OS_POSIX) && !defined(OS_MACOSX) - printf("%s\n", base::SysWideToNativeMB( - l10n_util::GetString(IDS_USED_EXISTING_BROWSER)).c_str()); + printf("%s\n", base::SysWideToNativeMB( + l10n_util::GetString(IDS_USED_EXISTING_BROWSER)).c_str()); #endif - return ResultCodes::NORMAL_EXIT; + return ResultCodes::NORMAL_EXIT; - case ProcessSingleton::PROFILE_IN_USE: - return ResultCodes::PROFILE_IN_USE; + case ProcessSingleton::PROFILE_IN_USE: + return ResultCodes::PROFILE_IN_USE; - default: - NOTREACHED(); + default: + NOTREACHED(); + } +#if !defined(OS_MACOSX) // closing brace for if } +#endif // Profile creation ---------------------------------------------------------- |