| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "chrome/browser/chromeos/login/login_utils.h" | 42 #include "chrome/browser/chromeos/login/login_utils.h" |
| 43 #include "chrome/browser/chromeos/login/login_wizard.h" | 43 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 44 #include "chrome/browser/chromeos/login/screen_locker.h" | 44 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 45 #include "chrome/browser/chromeos/login/user_manager.h" | 45 #include "chrome/browser/chromeos/login/user_manager.h" |
| 46 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | 46 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
| 47 #include "chrome/browser/chromeos/login/wizard_controller.h" | 47 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 48 #include "chrome/browser/chromeos/memory/low_memory_observer.h" | 48 #include "chrome/browser/chromeos/memory/low_memory_observer.h" |
| 49 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" | 49 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" |
| 50 #include "chrome/browser/chromeos/net/connectivity_state_helper.h" | 50 #include "chrome/browser/chromeos/net/connectivity_state_helper.h" |
| 51 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" | 51 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" |
| 52 #include "chrome/browser/chromeos/net/managed_network_configuration_handler.h" |
| 52 #include "chrome/browser/chromeos/net/network_change_notifier_network_library.h" | 53 #include "chrome/browser/chromeos/net/network_change_notifier_network_library.h" |
| 53 #include "chrome/browser/chromeos/net/network_portal_detector.h" | 54 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
| 54 #include "chrome/browser/chromeos/power/brightness_observer.h" | 55 #include "chrome/browser/chromeos/power/brightness_observer.h" |
| 55 #include "chrome/browser/chromeos/power/output_observer.h" | 56 #include "chrome/browser/chromeos/power/output_observer.h" |
| 56 #include "chrome/browser/chromeos/power/power_button_observer.h" | 57 #include "chrome/browser/chromeos/power/power_button_observer.h" |
| 57 #include "chrome/browser/chromeos/power/resume_observer.h" | 58 #include "chrome/browser/chromeos/power/resume_observer.h" |
| 58 #include "chrome/browser/chromeos/power/screen_dimming_observer.h" | 59 #include "chrome/browser/chromeos/power/screen_dimming_observer.h" |
| 59 #include "chrome/browser/chromeos/power/screen_lock_observer.h" | 60 #include "chrome/browser/chromeos/power/screen_lock_observer.h" |
| 60 #include "chrome/browser/chromeos/power/suspend_observer.h" | 61 #include "chrome/browser/chromeos/power/suspend_observer.h" |
| 61 #include "chrome/browser/chromeos/power/user_activity_notifier.h" | 62 #include "chrome/browser/chromeos/power/user_activity_notifier.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // This function and SystemKeyEventListener use InputMethodManager. | 254 // This function and SystemKeyEventListener use InputMethodManager. |
| 254 chromeos::input_method::Initialize(); | 255 chromeos::input_method::Initialize(); |
| 255 disks::DiskMountManager::Initialize(); | 256 disks::DiskMountManager::Initialize(); |
| 256 cryptohome::AsyncMethodCaller::Initialize(); | 257 cryptohome::AsyncMethodCaller::Initialize(); |
| 257 | 258 |
| 258 // Always initialize these handlers which should not conflict with | 259 // Always initialize these handlers which should not conflict with |
| 259 // NetworkLibrary. | 260 // NetworkLibrary. |
| 260 chromeos::network_event_log::Initialize(); | 261 chromeos::network_event_log::Initialize(); |
| 261 chromeos::GeolocationHandler::Initialize(); | 262 chromeos::GeolocationHandler::Initialize(); |
| 262 chromeos::NetworkStateHandler::Initialize(); | 263 chromeos::NetworkStateHandler::Initialize(); |
| 263 chromeos::NetworkConfigurationHandler::Initialize(); | 264 |
| 265 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 266 chromeos::switches::kEnableNewNetworkConfigurationHandlers)) { |
| 267 chromeos::NetworkConfigurationHandler::Initialize(); |
| 268 chromeos::ManagedNetworkConfigurationHandler::Initialize(); |
| 269 } |
| 264 | 270 |
| 265 // Initialize the network change notifier for Chrome OS. The network | 271 // Initialize the network change notifier for Chrome OS. The network |
| 266 // change notifier starts to monitor changes from the power manager and | 272 // change notifier starts to monitor changes from the power manager and |
| 267 // the network manager. | 273 // the network manager. |
| 268 if (CommandLine::ForCurrentProcess()->HasSwitch( | 274 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 269 chromeos::switches::kEnableNewNetworkChangeNotifier)) { | 275 chromeos::switches::kEnableNewNetworkChangeNotifier)) { |
| 270 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); | 276 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); |
| 271 } else { | 277 } else { |
| 272 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); | 278 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); |
| 273 } | 279 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 291 | 297 |
| 292 ~DBusServices() { | 298 ~DBusServices() { |
| 293 // CrosLibrary is shut down before DBusThreadManager even though it | 299 // CrosLibrary is shut down before DBusThreadManager even though it |
| 294 // is initialized first becuase some of its libraries depend on DBus | 300 // is initialized first becuase some of its libraries depend on DBus |
| 295 // clients. | 301 // clients. |
| 296 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. | 302 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. |
| 297 // (crosbug.com/26160) | 303 // (crosbug.com/26160) |
| 298 if (cros_initialized_ && CrosLibrary::Get()) | 304 if (cros_initialized_ && CrosLibrary::Get()) |
| 299 CrosLibrary::Shutdown(); | 305 CrosLibrary::Shutdown(); |
| 300 | 306 |
| 307 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 308 chromeos::switches::kEnableNewNetworkConfigurationHandlers)) { |
| 309 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); |
| 310 chromeos::NetworkConfigurationHandler::Shutdown(); |
| 311 } |
| 312 |
| 301 chromeos::ConnectivityStateHelper::Shutdown(); | 313 chromeos::ConnectivityStateHelper::Shutdown(); |
| 302 chromeos::NetworkStateHandler::Shutdown(); | 314 chromeos::NetworkStateHandler::Shutdown(); |
| 303 chromeos::NetworkConfigurationHandler::Shutdown(); | |
| 304 chromeos::GeolocationHandler::Shutdown(); | 315 chromeos::GeolocationHandler::Shutdown(); |
| 305 chromeos::network_event_log::Shutdown(); | 316 chromeos::network_event_log::Shutdown(); |
| 306 | 317 |
| 307 cryptohome::AsyncMethodCaller::Shutdown(); | 318 cryptohome::AsyncMethodCaller::Shutdown(); |
| 308 disks::DiskMountManager::Shutdown(); | 319 disks::DiskMountManager::Shutdown(); |
| 309 input_method::Shutdown(); | 320 input_method::Shutdown(); |
| 310 CrosDBusService::Shutdown(); | 321 CrosDBusService::Shutdown(); |
| 311 // NOTE: This must only be called if Initialize() was called. | 322 // NOTE: This must only be called if Initialize() was called. |
| 312 DBusThreadManager::Shutdown(); | 323 DBusThreadManager::Shutdown(); |
| 313 } | 324 } |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 817 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
| 807 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 818 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
| 808 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 819 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
| 809 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 820 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
| 810 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 821 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
| 811 // This is necessary to start the experiment as a side effect. | 822 // This is necessary to start the experiment as a side effect. |
| 812 trial->group(); | 823 trial->group(); |
| 813 } | 824 } |
| 814 | 825 |
| 815 } // namespace chromeos | 826 } // namespace chromeos |
| OLD | NEW |