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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 1078213004: Remove --check-cloud-print-connector-policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sat Apr 11 02:29:11 PDT 2015 Created 5 years, 8 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/cloud_print_proxy_service.h » ('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 dc203f9f5a3b19882d8bc06da28263a5d32704f1..5538fc18637e0d8cbb2b9a4c7673767186946b60 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1181,51 +1181,44 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return chrome::RESULT_CODE_PACK_EXTENSION_ERROR;
}
- // 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.
- bool 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
- // to read the profile.
- notify_result_ = process_singleton_->NotifyOtherProcessOrCreate();
- switch (notify_result_) {
- case ProcessSingleton::PROCESS_NONE:
- // No process already running, fall through to starting a new one.
- break;
-
- case ProcessSingleton::PROCESS_NOTIFIED:
+ // 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.
+ notify_result_ = process_singleton_->NotifyOtherProcessOrCreate();
+ switch (notify_result_) {
+ 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)
- // On POSIX systems, print a message notifying the process is running.
- printf("%s\n", base::SysWideToNativeMB(base::UTF16ToWide(
- l10n_util::GetStringUTF16(IDS_USED_EXISTING_BROWSER))).c_str());
+ // On POSIX systems, print a message notifying the process is running.
+ printf("%s\n", base::SysWideToNativeMB(base::UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_USED_EXISTING_BROWSER))).c_str());
#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
- // Having a differentiated return type for testing allows for tests to
- // verify proper handling of some switches. When not testing, stick to
- // the standard Unix convention of returning zero when things went as
- // expected.
- if (parsed_command_line().HasSwitch(switches::kTestType))
- return chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED;
- return content::RESULT_CODE_NORMAL_EXIT;
-
- case ProcessSingleton::PROFILE_IN_USE:
- return chrome::RESULT_CODE_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 chrome::RESULT_CODE_PROFILE_IN_USE;
-
- default:
- NOTREACHED();
- }
+ // Having a differentiated return type for testing allows for tests to
+ // verify proper handling of some switches. When not testing, stick to
+ // the standard Unix convention of returning zero when things went as
+ // expected.
+ if (parsed_command_line().HasSwitch(switches::kTestType))
+ return chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED;
+ return content::RESULT_CODE_NORMAL_EXIT;
+
+ case ProcessSingleton::PROFILE_IN_USE:
+ return chrome::RESULT_CODE_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 chrome::RESULT_CODE_PROFILE_IN_USE;
+
+ default:
+ NOTREACHED();
}
#endif // !defined(OS_ANDROID)
« no previous file with comments | « no previous file | chrome/browser/printing/cloud_print/cloud_print_proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698