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/shell.h" | 10 #include "ash/shell.h" |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 // Add observers for WallpaperManager. This depends on PowerManagerClient, | 522 // Add observers for WallpaperManager. This depends on PowerManagerClient, |
523 // TimezoneSettings and CrosSettings. | 523 // TimezoneSettings and CrosSettings. |
524 WallpaperManager::Get()->AddObservers(); | 524 WallpaperManager::Get()->AddObservers(); |
525 | 525 |
526 #if defined(USE_LINUX_BREAKPAD) | 526 #if defined(USE_LINUX_BREAKPAD) |
527 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, | 527 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, |
528 base::Bind(&ChromeOSVersionCallback), | 528 base::Bind(&ChromeOSVersionCallback), |
529 &tracker_); | 529 &tracker_); |
530 #endif | 530 #endif |
531 | 531 |
| 532 removable_device_notifications_ = |
| 533 new RemovableDeviceNotificationsCros(); |
| 534 |
532 // In Aura builds this will initialize ash::Shell. | 535 // In Aura builds this will initialize ash::Shell. |
533 ChromeBrowserMainPartsLinux::PreProfileInit(); | 536 ChromeBrowserMainPartsLinux::PreProfileInit(); |
534 } | 537 } |
535 | 538 |
536 void ChromeBrowserMainPartsChromeos::PostProfileInit() { | 539 void ChromeBrowserMainPartsChromeos::PostProfileInit() { |
537 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 540 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
538 // -- just after CreateProfile(). | 541 // -- just after CreateProfile(). |
539 | 542 |
540 if (parsed_command_line().HasSwitch(::switches::kLoginUser) && | 543 if (parsed_command_line().HasSwitch(::switches::kLoginUser) && |
541 !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { | 544 !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 switches::kEnableScreensaverExtensions)) { | 592 switches::kEnableScreensaverExtensions)) { |
590 screensaver_controller_.reset(new ScreensaverController()); | 593 screensaver_controller_.reset(new ScreensaverController()); |
591 } | 594 } |
592 suspend_observer_.reset(new SuspendObserver()); | 595 suspend_observer_.reset(new SuspendObserver()); |
593 if (KioskModeSettings::Get()->IsKioskModeEnabled()) { | 596 if (KioskModeSettings::Get()->IsKioskModeEnabled()) { |
594 power_state_override_ = new PowerStateOverride( | 597 power_state_override_ = new PowerStateOverride( |
595 PowerStateOverride::BLOCK_DISPLAY_SLEEP); | 598 PowerStateOverride::BLOCK_DISPLAY_SLEEP); |
596 } | 599 } |
597 chromeos::accessibility::Initialize(); | 600 chromeos::accessibility::Initialize(); |
598 | 601 |
599 removable_device_notifications_ = | 602 removable_device_notifications_->Init(); |
600 new RemovableDeviceNotificationsCros(); | |
601 | 603 |
602 // Initialize the network portal detector for Chrome OS. The network | 604 // Initialize the network portal detector for Chrome OS. The network |
603 // portal detector starts to listen for notifications from | 605 // portal detector starts to listen for notifications from |
604 // NetworkLibrary about changes in the NetworkManager and initiates | 606 // NetworkLibrary about changes in the NetworkManager and initiates |
605 // captive portal detection for active networks. | 607 // captive portal detection for active networks. |
606 if (NetworkPortalDetector::IsEnabled() && | 608 if (NetworkPortalDetector::IsEnabled() && |
607 NetworkPortalDetector::GetInstance()) { | 609 NetworkPortalDetector::GetInstance()) { |
608 NetworkPortalDetector::GetInstance()->Init(); | 610 NetworkPortalDetector::GetInstance()->Init(); |
609 } | 611 } |
610 | 612 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 819 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
818 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 820 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
819 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 821 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
820 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 822 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
821 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 823 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
822 // This is necessary to start the experiment as a side effect. | 824 // This is necessary to start the experiment as a side effect. |
823 trial->group(); | 825 trial->group(); |
824 } | 826 } |
825 | 827 |
826 } // namespace chromeos | 828 } // namespace chromeos |
OLD | NEW |