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

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

Issue 1291793005: Remove command line flag to install an ephemeral app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oops Created 5 years, 4 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 silent_launch = true; 524 silent_launch = true;
525 } 525 }
526 #endif // defined(ENABLE_PRINT_PREVIEW) 526 #endif // defined(ENABLE_PRINT_PREVIEW)
527 527
528 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { 528 if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) {
529 std::string allowed_ports = 529 std::string allowed_ports =
530 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); 530 command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts);
531 net::SetExplicitlyAllowedPorts(allowed_ports); 531 net::SetExplicitlyAllowedPorts(allowed_ports);
532 } 532 }
533 533
534 if (command_line.HasSwitch(switches::kInstallEphemeralAppFromWebstore)) {
535 extensions::StartupHelper helper;
536 helper.InstallEphemeralApp(command_line, last_used_profile);
537 // Nothing more needs to be done, so return false to stop launching and
538 // quit.
539 return false;
540 }
541
542 if (command_line.HasSwitch(switches::kValidateCrx)) { 534 if (command_line.HasSwitch(switches::kValidateCrx)) {
543 if (!process_startup) { 535 if (!process_startup) {
544 LOG(ERROR) << "chrome is already running; you must close all running " 536 LOG(ERROR) << "chrome is already running; you must close all running "
545 << "instances before running with the --" 537 << "instances before running with the --"
546 << switches::kValidateCrx << " flag"; 538 << switches::kValidateCrx << " flag";
547 return false; 539 return false;
548 } 540 }
549 extensions::StartupHelper helper; 541 extensions::StartupHelper helper;
550 std::string message; 542 std::string message;
551 std::string error; 543 std::string error;
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 // If we are showing the app list then chrome isn't shown so load the app 836 // If we are showing the app list then chrome isn't shown so load the app
845 // list's profile rather than chrome's. 837 // list's profile rather than chrome's.
846 if (command_line.HasSwitch(switches::kShowAppList)) { 838 if (command_line.HasSwitch(switches::kShowAppList)) {
847 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> 839 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->
848 GetProfilePath(user_data_dir); 840 GetProfilePath(user_data_dir);
849 } 841 }
850 842
851 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 843 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
852 user_data_dir); 844 user_data_dir);
853 } 845 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698