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

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

Issue 514293003: Run athena on chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 return false; 526 return false;
527 } 527 }
528 528
529 if (command_line.HasSwitch(switches::kLimitedInstallFromWebstore)) { 529 if (command_line.HasSwitch(switches::kLimitedInstallFromWebstore)) {
530 extensions::StartupHelper helper; 530 extensions::StartupHelper helper;
531 helper.LimitedInstallFromWebstore(command_line, last_used_profile, 531 helper.LimitedInstallFromWebstore(command_line, last_used_profile,
532 base::Bind(&base::DoNothing)); 532 base::Bind(&base::DoNothing));
533 } 533 }
534 534
535 #if defined(OS_CHROMEOS) 535 #if defined(OS_CHROMEOS)
536
537 #if defined(USE_ATHENA)
538 // Athena will never launch browser.
539 silent_launch = true;
540 #endif
541
536 // The browser will be launched after the user logs in. 542 // The browser will be launched after the user logs in.
537 if (command_line.HasSwitch(chromeos::switches::kLoginManager)) 543 if (command_line.HasSwitch(chromeos::switches::kLoginManager))
538 silent_launch = true; 544 silent_launch = true;
539 545
540 if (chrome::IsRunningInAppMode() && 546 if (chrome::IsRunningInAppMode() &&
541 command_line.HasSwitch(switches::kAppId)) { 547 command_line.HasSwitch(switches::kAppId)) {
542 chromeos::LaunchAppOrDie( 548 chromeos::LaunchAppOrDie(
543 last_used_profile, 549 last_used_profile,
544 command_line.GetSwitchValueASCII(switches::kAppId)); 550 command_line.GetSwitchValueASCII(switches::kAppId));
545 551
546 // Skip browser launch since app mode launches its app window. 552 // Skip browser launch since app mode launches its app window.
547 silent_launch = true; 553 silent_launch = true;
548 } 554 }
549 555
550 // If we are a demo app session and we crashed, there is no safe recovery 556 // If we are a demo app session and we crashed, there is no safe recovery
551 // possible. We should instead cleanly exit and go back to the OOBE screen, 557 // possible. We should instead cleanly exit and go back to the OOBE screen,
552 // where we will launch again after the timeout has expired. 558 // where we will launch again after the timeout has expired.
553 if (chromeos::DemoAppLauncher::IsDemoAppSession( 559 if (chromeos::DemoAppLauncher::IsDemoAppSession(
554 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { 560 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) {
555 chrome::AttemptUserExit(); 561 chrome::AttemptUserExit();
556 return false; 562 return false;
557 } 563 }
558 #endif 564 #endif
Yoyo Zhou 2014/08/29 22:23:30 nit: if we're going to have nested #ifdefs here th
oshima 2014/08/29 23:25:26 Done.
559 565
560 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) 566 #if defined(TOOLKIT_VIEWS) && defined(USE_X11)
561 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); 567 ui::TouchFactory::SetTouchDeviceListFromCommandLine();
562 #endif 568 #endif
563 569
564 #if defined(OS_MACOSX) 570 #if defined(OS_MACOSX)
565 if (web_app::MaybeRebuildShortcut(command_line)) 571 if (web_app::MaybeRebuildShortcut(command_line))
566 return true; 572 return true;
567 #endif 573 #endif
568 574
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 // If we are showing the app list then chrome isn't shown so load the app 742 // If we are showing the app list then chrome isn't shown so load the app
737 // list's profile rather than chrome's. 743 // list's profile rather than chrome's.
738 if (command_line.HasSwitch(switches::kShowAppList)) { 744 if (command_line.HasSwitch(switches::kShowAppList)) {
739 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> 745 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)->
740 GetProfilePath(user_data_dir); 746 GetProfilePath(user_data_dir);
741 } 747 }
742 748
743 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 749 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
744 user_data_dir); 750 user_data_dir);
745 } 751 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698