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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 702603004: Renamed DISABLE_BASIC_PRINTING and ENABLE_FULL_PRINTING. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Nov 5 02:31:54 PST 2014 Created 6 years, 1 month 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 #endif 81 #endif
82 82
83 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) 83 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
84 #include "ui/events/devices/x11/touch_factory_x11.h" 84 #include "ui/events/devices/x11/touch_factory_x11.h"
85 #endif 85 #endif
86 86
87 #if defined(OS_MACOSX) 87 #if defined(OS_MACOSX)
88 #include "chrome/browser/web_applications/web_app_mac.h" 88 #include "chrome/browser/web_applications/web_app_mac.h"
89 #endif 89 #endif
90 90
91 #if defined(ENABLE_FULL_PRINTING) 91 #if defined(ENABLE_PRINT_PREVIEW)
92 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 92 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
93 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 93 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
94 #include "chrome/browser/printing/print_dialog_cloud.h" 94 #include "chrome/browser/printing/print_dialog_cloud.h"
95 #endif 95 #endif
96 96
97 using content::BrowserThread; 97 using content::BrowserThread;
98 using content::ChildProcessSecurityPolicy; 98 using content::ChildProcessSecurityPolicy;
99 99
100 namespace { 100 namespace {
101 101
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 int* return_code, 485 int* return_code,
486 StartupBrowserCreator* browser_creator) { 486 StartupBrowserCreator* browser_creator) {
487 DCHECK(last_used_profile); 487 DCHECK(last_used_profile);
488 if (process_startup) { 488 if (process_startup) {
489 if (command_line.HasSwitch(switches::kDisablePromptOnRepost)) 489 if (command_line.HasSwitch(switches::kDisablePromptOnRepost))
490 content::NavigationController::DisablePromptOnRepost(); 490 content::NavigationController::DisablePromptOnRepost();
491 } 491 }
492 492
493 bool silent_launch = false; 493 bool silent_launch = false;
494 494
495 #if defined(ENABLE_FULL_PRINTING) 495 #if defined(ENABLE_PRINT_PREVIEW)
496 // If we are just displaying a print dialog we shouldn't open browser 496 // If we are just displaying a print dialog we shouldn't open browser
497 // windows. 497 // windows.
498 if (command_line.HasSwitch(switches::kCloudPrintFile) && 498 if (command_line.HasSwitch(switches::kCloudPrintFile) &&
499 print_dialog_cloud::CreatePrintDialogFromCommandLine(last_used_profile, 499 print_dialog_cloud::CreatePrintDialogFromCommandLine(last_used_profile,
500 command_line)) { 500 command_line)) {
501 silent_launch = true; 501 silent_launch = true;
502 } 502 }
503 503
504 // If we are checking the proxy enabled policy, don't open any windows. 504 // If we are checking the proxy enabled policy, don't open any windows.
505 if (command_line.HasSwitch(switches::kCheckCloudPrintConnectorPolicy)) { 505 if (command_line.HasSwitch(switches::kCheckCloudPrintConnectorPolicy)) {
506 silent_launch = true; 506 silent_launch = true;
507 if (CloudPrintProxyServiceFactory::GetForProfile(last_used_profile)-> 507 if (CloudPrintProxyServiceFactory::GetForProfile(last_used_profile)->
508 EnforceCloudPrintConnectorPolicyAndQuit()) 508 EnforceCloudPrintConnectorPolicyAndQuit())
509 // Success, nothing more needs to be done, so return false to stop 509 // Success, nothing more needs to be done, so return false to stop
510 // launching and quit. 510 // launching and quit.
511 return false; 511 return false;
512 } 512 }
513 #endif // defined(ENABLE_FULL_PRINTING) 513 #endif // defined(ENABLE_PRINT_PREVIEW)
514 514
515 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { 515 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) {
516 std::string allowed_ports = 516 std::string allowed_ports =
517 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); 517 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts);
518 net::SetExplicitlyAllowedPorts(allowed_ports); 518 net::SetExplicitlyAllowedPorts(allowed_ports);
519 } 519 }
520 520
521 if (command_line.HasSwitch(switches::kInstallEphemeralAppFromWebstore)) { 521 if (command_line.HasSwitch(switches::kInstallEphemeralAppFromWebstore)) {
522 extensions::StartupHelper helper; 522 extensions::StartupHelper helper;
523 helper.InstallEphemeralApp(command_line, last_used_profile); 523 helper.InstallEphemeralApp(command_line, last_used_profile);
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 // If we are showing the app list then chrome isn't shown so load the app 770 // If we are showing the app list then chrome isn't shown so load the app
771 // list's profile rather than chrome's. 771 // list's profile rather than chrome's.
772 if (command_line.HasSwitch(switches::kShowAppList)) { 772 if (command_line.HasSwitch(switches::kShowAppList)) {
773 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> 773 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->
774 GetProfilePath(user_data_dir); 774 GetProfilePath(user_data_dir);
775 } 775 }
776 776
777 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 777 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
778 user_data_dir); 778 user_data_dir);
779 } 779 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698