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

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

Issue 617833003: Remove --install-from-webstore and --limited-install-from-webstore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 return false; 494 return false;
495 } 495 }
496 #endif // defined(ENABLE_FULL_PRINTING) 496 #endif // defined(ENABLE_FULL_PRINTING)
497 497
498 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { 498 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) {
499 std::string allowed_ports = 499 std::string allowed_ports =
500 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); 500 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts);
501 net::SetExplicitlyAllowedPorts(allowed_ports); 501 net::SetExplicitlyAllowedPorts(allowed_ports);
502 } 502 }
503 503
504 if (command_line.HasSwitch(switches::kInstallFromWebstore)) { 504 if (command_line.HasSwitch(switches::kInstallEphemeralAppFromWebstore)) {
505 extensions::StartupHelper helper; 505 extensions::StartupHelper helper;
506 helper.InstallFromWebstore(command_line, last_used_profile); 506 helper.InstallEphemeralApp(command_line, last_used_profile);
507 // Nothing more needs to be done, so return false to stop launching and 507 // Nothing more needs to be done, so return false to stop launching and
508 // quit. 508 // quit.
509 return false; 509 return false;
510 } 510 }
511 511
512 if (command_line.HasSwitch(switches::kValidateCrx)) { 512 if (command_line.HasSwitch(switches::kValidateCrx)) {
513 if (!process_startup) { 513 if (!process_startup) {
514 LOG(ERROR) << "chrome is already running; you must close all running " 514 LOG(ERROR) << "chrome is already running; you must close all running "
515 << "instances before running with the --" 515 << "instances before running with the --"
516 << switches::kValidateCrx << " flag"; 516 << switches::kValidateCrx << " flag";
517 return false; 517 return false;
518 } 518 }
519 extensions::StartupHelper helper; 519 extensions::StartupHelper helper;
520 std::string message; 520 std::string message;
521 std::string error; 521 std::string error;
522 if (helper.ValidateCrx(command_line, &error)) 522 if (helper.ValidateCrx(command_line, &error))
523 message = std::string("ValidateCrx Success"); 523 message = std::string("ValidateCrx Success");
524 else 524 else
525 message = std::string("ValidateCrx Failure: ") + error; 525 message = std::string("ValidateCrx Failure: ") + error;
526 printf("%s\n", message.c_str()); 526 printf("%s\n", message.c_str());
527 return false; 527 return false;
528 } 528 }
529 529
530 if (command_line.HasSwitch(switches::kLimitedInstallFromWebstore)) {
531 extensions::StartupHelper helper;
532 helper.LimitedInstallFromWebstore(command_line, last_used_profile,
533 base::Bind(&base::DoNothing));
534 }
535
536 #if defined(OS_CHROMEOS) 530 #if defined(OS_CHROMEOS)
537 531
538 #if defined(USE_ATHENA) 532 #if defined(USE_ATHENA)
539 // Athena will never launch browser. 533 // Athena will never launch browser.
540 silent_launch = true; 534 silent_launch = true;
541 #endif 535 #endif
542 536
543 // The browser will be launched after the user logs in. 537 // The browser will be launched after the user logs in.
544 if (command_line.HasSwitch(chromeos::switches::kLoginManager)) 538 if (command_line.HasSwitch(chromeos::switches::kLoginManager))
545 silent_launch = true; 539 silent_launch = true;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 // If we are showing the app list then chrome isn't shown so load the app 739 // If we are showing the app list then chrome isn't shown so load the app
746 // list's profile rather than chrome's. 740 // list's profile rather than chrome's.
747 if (command_line.HasSwitch(switches::kShowAppList)) { 741 if (command_line.HasSwitch(switches::kShowAppList)) {
748 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> 742 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->
749 GetProfilePath(user_data_dir); 743 GetProfilePath(user_data_dir);
750 } 744 }
751 745
752 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 746 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
753 user_data_dir); 747 user_data_dir);
754 } 748 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698