OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 WallpaperManager::Get()->AddObservers(); | 611 WallpaperManager::Get()->AddObservers(); |
612 | 612 |
613 #if defined(USE_LINUX_BREAKPAD) | 613 #if defined(USE_LINUX_BREAKPAD) |
614 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, | 614 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, |
615 base::Bind(&ChromeOSVersionCallback), | 615 base::Bind(&ChromeOSVersionCallback), |
616 &tracker_); | 616 &tracker_); |
617 #endif | 617 #endif |
618 | 618 |
619 storage_monitor_.reset(new StorageMonitorCros()); | 619 storage_monitor_.reset(new StorageMonitorCros()); |
620 | 620 |
| 621 // Make sure that wallpaper boot transition and other delays in OOBE |
| 622 // are disabled for tests and kiosk app launch by default. |
| 623 // Individual tests may enable them if they want. |
| 624 if (parsed_command_line().HasSwitch(::switches::kTestType) || |
| 625 ShouldAutoLaunchKioskApp(parsed_command_line())) { |
| 626 WizardController::SetZeroDelays(); |
| 627 } |
| 628 |
621 // In Aura builds this will initialize ash::Shell. | 629 // In Aura builds this will initialize ash::Shell. |
622 ChromeBrowserMainPartsLinux::PreProfileInit(); | 630 ChromeBrowserMainPartsLinux::PreProfileInit(); |
623 } | 631 } |
624 | 632 |
625 void ChromeBrowserMainPartsChromeos::PostProfileInit() { | 633 void ChromeBrowserMainPartsChromeos::PostProfileInit() { |
626 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 634 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
627 // -- just after CreateProfile(). | 635 // -- just after CreateProfile(). |
628 | 636 |
629 if (parsed_command_line().HasSwitch(switches::kLoginUser) && | 637 if (parsed_command_line().HasSwitch(switches::kLoginUser) && |
630 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { | 638 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { |
631 // Make sure we flip every profile to not share proxies if the user hasn't | 639 // Make sure we flip every profile to not share proxies if the user hasn't |
632 // specified so explicitly. | 640 // specified so explicitly. |
633 const PrefService::Preference* use_shared_proxies_pref = | 641 const PrefService::Preference* use_shared_proxies_pref = |
634 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); | 642 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); |
635 if (use_shared_proxies_pref->IsDefaultValue()) | 643 if (use_shared_proxies_pref->IsDefaultValue()) |
636 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); | 644 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); |
637 | 645 |
638 // This is done in LoginUtils::OnProfileCreated during normal login. | 646 // This is done in LoginUtils::OnProfileCreated during normal login. |
639 LoginUtils::Get()->InitRlzDelayed(profile()); | 647 LoginUtils::Get()->InitRlzDelayed(profile()); |
640 } | 648 } |
641 | 649 |
642 // Make sure the NetworkConfigurationUpdater is ready so that it pushes ONC | 650 // Make sure the NetworkConfigurationUpdater is ready so that it pushes ONC |
643 // configuration before login. | 651 // configuration before login. |
644 g_browser_process->browser_policy_connector()-> | 652 g_browser_process->browser_policy_connector()-> |
645 GetNetworkConfigurationUpdater(); | 653 GetNetworkConfigurationUpdater(); |
646 | 654 |
647 // Make sure that wallpaper boot transition and other delays in OOBE | |
648 // are disabled for tests by default. | |
649 // Individual tests may enable them if they want. | |
650 if (parsed_command_line().HasSwitch(::switches::kTestType)) | |
651 WizardController::SetZeroDelays(); | |
652 | |
653 // Start loading the machine statistics. Note: if we start loading machine | 655 // Start loading the machine statistics. Note: if we start loading machine |
654 // statistics early in PreEarlyInitialization() then the crossystem tool | 656 // statistics early in PreEarlyInitialization() then the crossystem tool |
655 // sometimes hangs for unknown reasons, see http://crbug.com/167671. | 657 // sometimes hangs for unknown reasons, see http://crbug.com/167671. |
656 // Also we must start loading no later than this point, because login manager | 658 // Also we must start loading no later than this point, because login manager |
657 // may call GetMachineStatistic() during startup, see crbug.com/170635. | 659 // may call GetMachineStatistic() during startup, see crbug.com/170635. |
658 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics(); | 660 system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics(); |
659 | 661 |
660 // Tests should be able to tune login manager before showing it. | 662 // Tests should be able to tune login manager before showing it. |
661 // Thus only show login manager in normal (non-testing) mode. | 663 // Thus only show login manager in normal (non-testing) mode. |
662 if (!parameters().ui_task || | 664 if (!parameters().ui_task || |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 905 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
904 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 906 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
905 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 907 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
906 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 908 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
907 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 909 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
908 // This is necessary to start the experiment as a side effect. | 910 // This is necessary to start the experiment as a side effect. |
909 trial->group(); | 911 trial->group(); |
910 } | 912 } |
911 | 913 |
912 } // namespace chromeos | 914 } // namespace chromeos |
OLD | NEW |