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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 10823059: Revert revert of 146149 - Don't pass the connector check policy along. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Catch up with timeout method rename. Created 8 years, 5 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 | « no previous file | chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 60f105a0ca2d2010d75d0abe7cd1a424f4a7b659..6369faf66a410fc7b55ad7b9f1db27668680fbc2 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1550,13 +1550,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return chrome::RESULT_CODE_PACK_EXTENSION_ERROR;
}
+ bool pass_command_line = true;
+
#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 (!HasImportSwitch(parsed_command_line())) {
+ pass_command_line = !HasImportSwitch(parsed_command_line());
#endif
+
+ // If we're being launched just to check the connector policy, we are
+ // short-lived and don't want to be passing that switch off.
+ pass_command_line = pass_command_line && !parsed_command_line().HasSwitch(
+ switches::kCheckCloudPrintConnectorPolicy);
+
+ if (pass_command_line) {
// 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
@@ -1573,7 +1582,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
printf("%s\n", base::SysWideToNativeMB(UTF16ToWide(
l10n_util::GetStringUTF16(IDS_USED_EXISTING_BROWSER))).c_str());
#endif
- return content::RESULT_CODE_NORMAL_EXIT;
+ return chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED;
case ProcessSingleton::PROFILE_IN_USE:
return chrome::RESULT_CODE_PROFILE_IN_USE;
@@ -1589,9 +1598,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
default:
NOTREACHED();
}
-#if !defined(OS_MACOSX) // closing brace for if
}
-#endif
#if defined(USE_X11)
SetBrowserX11ErrorHandlers();
« no previous file with comments | « no previous file | chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698