| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 #include "chromeos/disks/disk_mount_manager.h" | 104 #include "chromeos/disks/disk_mount_manager.h" |
| 105 #include "chromeos/ime/input_method_manager.h" | 105 #include "chromeos/ime/input_method_manager.h" |
| 106 #include "chromeos/ime/xkeyboard.h" | 106 #include "chromeos/ime/xkeyboard.h" |
| 107 #include "chromeos/login/login_state.h" | 107 #include "chromeos/login/login_state.h" |
| 108 #include "chromeos/network/geolocation_handler.h" | 108 #include "chromeos/network/geolocation_handler.h" |
| 109 #include "chromeos/network/managed_network_configuration_handler.h" | 109 #include "chromeos/network/managed_network_configuration_handler.h" |
| 110 #include "chromeos/network/network_change_notifier_chromeos.h" | 110 #include "chromeos/network/network_change_notifier_chromeos.h" |
| 111 #include "chromeos/network/network_change_notifier_factory_chromeos.h" | 111 #include "chromeos/network/network_change_notifier_factory_chromeos.h" |
| 112 #include "chromeos/network/network_configuration_handler.h" | 112 #include "chromeos/network/network_configuration_handler.h" |
| 113 #include "chromeos/network/network_event_log.h" | 113 #include "chromeos/network/network_event_log.h" |
| 114 #include "chromeos/network/network_profile_handler.h" |
| 114 #include "chromeos/network/network_state_handler.h" | 115 #include "chromeos/network/network_state_handler.h" |
| 115 #include "content/public/browser/browser_thread.h" | 116 #include "content/public/browser/browser_thread.h" |
| 116 #include "content/public/browser/notification_service.h" | 117 #include "content/public/browser/notification_service.h" |
| 117 #include "content/public/browser/power_save_blocker.h" | 118 #include "content/public/browser/power_save_blocker.h" |
| 118 #include "content/public/common/main_function_params.h" | 119 #include "content/public/common/main_function_params.h" |
| 119 #include "grit/platform_locale_settings.h" | 120 #include "grit/platform_locale_settings.h" |
| 120 #include "net/base/network_change_notifier.h" | 121 #include "net/base/network_change_notifier.h" |
| 121 #include "net/url_request/url_request.h" | 122 #include "net/url_request/url_request.h" |
| 122 #include "net/url_request/url_request_context_getter.h" | 123 #include "net/url_request/url_request_context_getter.h" |
| 123 | 124 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 cryptohome::AsyncMethodCaller::Initialize(); | 316 cryptohome::AsyncMethodCaller::Initialize(); |
| 316 | 317 |
| 317 chromeos::LoginState::Initialize(); | 318 chromeos::LoginState::Initialize(); |
| 318 | 319 |
| 319 // Always initialize these handlers which should not conflict with | 320 // Always initialize these handlers which should not conflict with |
| 320 // NetworkLibrary. | 321 // NetworkLibrary. |
| 321 chromeos::network_event_log::Initialize(); | 322 chromeos::network_event_log::Initialize(); |
| 322 chromeos::GeolocationHandler::Initialize(); | 323 chromeos::GeolocationHandler::Initialize(); |
| 323 chromeos::NetworkStateHandler::Initialize(); | 324 chromeos::NetworkStateHandler::Initialize(); |
| 324 | 325 |
| 326 chromeos::NetworkProfileHandler* profile_handler = |
| 327 chromeos::NetworkProfileHandler::Initialize(); |
| 325 chromeos::NetworkConfigurationHandler::Initialize(); | 328 chromeos::NetworkConfigurationHandler::Initialize(); |
| 326 chromeos::ManagedNetworkConfigurationHandler::Initialize(); | 329 chromeos::ManagedNetworkConfigurationHandler::Initialize( |
| 330 profile_handler); |
| 327 | 331 |
| 328 // Initialize the network change notifier for Chrome OS. The network | 332 // Initialize the network change notifier for Chrome OS. The network |
| 329 // change notifier starts to monitor changes from the power manager and | 333 // change notifier starts to monitor changes from the power manager and |
| 330 // the network manager. | 334 // the network manager. |
| 331 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 335 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 332 chromeos::switches::kDisableNewNetworkChangeNotifier)) { | 336 chromeos::switches::kDisableNewNetworkChangeNotifier)) { |
| 333 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); | 337 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); |
| 334 } else { | 338 } else { |
| 335 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); | 339 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); |
| 336 } | 340 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 360 // CrosLibrary is shut down before DBusThreadManager even though it | 364 // CrosLibrary is shut down before DBusThreadManager even though it |
| 361 // is initialized first becuase some of its libraries depend on DBus | 365 // is initialized first becuase some of its libraries depend on DBus |
| 362 // clients. | 366 // clients. |
| 363 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. | 367 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. |
| 364 // (crosbug.com/26160) | 368 // (crosbug.com/26160) |
| 365 if (cros_initialized_ && CrosLibrary::Get()) | 369 if (cros_initialized_ && CrosLibrary::Get()) |
| 366 CrosLibrary::Shutdown(); | 370 CrosLibrary::Shutdown(); |
| 367 | 371 |
| 368 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); | 372 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); |
| 369 chromeos::NetworkConfigurationHandler::Shutdown(); | 373 chromeos::NetworkConfigurationHandler::Shutdown(); |
| 374 chromeos::NetworkProfileHandler::Shutdown(); |
| 370 | 375 |
| 371 chromeos::NetworkStateHandler::Shutdown(); | 376 chromeos::NetworkStateHandler::Shutdown(); |
| 372 chromeos::GeolocationHandler::Shutdown(); | 377 chromeos::GeolocationHandler::Shutdown(); |
| 373 chromeos::network_event_log::Shutdown(); | 378 chromeos::network_event_log::Shutdown(); |
| 374 | 379 |
| 375 chromeos::LoginState::Shutdown(); | 380 chromeos::LoginState::Shutdown(); |
| 376 | 381 |
| 377 cryptohome::AsyncMethodCaller::Shutdown(); | 382 cryptohome::AsyncMethodCaller::Shutdown(); |
| 378 disks::DiskMountManager::Shutdown(); | 383 disks::DiskMountManager::Shutdown(); |
| 379 input_method::Shutdown(); | 384 input_method::Shutdown(); |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 898 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
| 894 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 899 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
| 895 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 900 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
| 896 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 901 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
| 897 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 902 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
| 898 // This is necessary to start the experiment as a side effect. | 903 // This is necessary to start the experiment as a side effect. |
| 899 trial->group(); | 904 trial->group(); |
| 900 } | 905 } |
| 901 | 906 |
| 902 } // namespace chromeos | 907 } // namespace chromeos |
| OLD | NEW |