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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/startup/startup_browser_creator.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 #include <set> 8 #include <set>
9 9
10 #include "apps/app_load_service.h" 10 #include "apps/app_load_service.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 bool silent_launch = false; 506 bool silent_launch = false;
507 507
508 #if defined(ENABLE_PRINT_PREVIEW) 508 #if defined(ENABLE_PRINT_PREVIEW)
509 // If we are just displaying a print dialog we shouldn't open browser 509 // If we are just displaying a print dialog we shouldn't open browser
510 // windows. 510 // windows.
511 if (command_line.HasSwitch(switches::kCloudPrintFile) && 511 if (command_line.HasSwitch(switches::kCloudPrintFile) &&
512 print_dialog_cloud::CreatePrintDialogFromCommandLine(last_used_profile, 512 print_dialog_cloud::CreatePrintDialogFromCommandLine(last_used_profile,
513 command_line)) { 513 command_line)) {
514 silent_launch = true; 514 silent_launch = true;
515 } 515 }
516
517 // If we are checking the proxy enabled policy, don't open any windows.
518 if (command_line.HasSwitch(switches::kCheckCloudPrintConnectorPolicy)) {
519 silent_launch = true;
520 if (CloudPrintProxyServiceFactory::GetForProfile(last_used_profile)->
521 EnforceCloudPrintConnectorPolicyAndQuit())
522 // Success, nothing more needs to be done, so return false to stop
523 // launching and quit.
524 return false;
525 }
526 #endif // defined(ENABLE_PRINT_PREVIEW) 516 #endif // defined(ENABLE_PRINT_PREVIEW)
527 517
528 VLOG(2) << "ProcessCmdLineImpl: PLACE 1"; 518 VLOG(2) << "ProcessCmdLineImpl: PLACE 1";
529 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { 519 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) {
530 std::string allowed_ports = 520 std::string allowed_ports =
531 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); 521 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts);
532 net::SetExplicitlyAllowedPorts(allowed_ports); 522 net::SetExplicitlyAllowedPorts(allowed_ports);
533 } 523 }
534 524
535 if (command_line.HasSwitch(switches::kInstallEphemeralAppFromWebstore)) { 525 if (command_line.HasSwitch(switches::kInstallEphemeralAppFromWebstore)) {
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 // If we are showing the app list then chrome isn't shown so load the app 846 // If we are showing the app list then chrome isn't shown so load the app
857 // list's profile rather than chrome's. 847 // list's profile rather than chrome's.
858 if (command_line.HasSwitch(switches::kShowAppList)) { 848 if (command_line.HasSwitch(switches::kShowAppList)) {
859 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> 849 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->
860 GetProfilePath(user_data_dir); 850 GetProfilePath(user_data_dir);
861 } 851 }
862 852
863 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 853 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
864 user_data_dir); 854 user_data_dir);
865 } 855 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698