| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 #include "chromeos/disks/disk_mount_manager.h" | 102 #include "chromeos/disks/disk_mount_manager.h" |
| 103 #include "chromeos/ime/input_method_manager.h" | 103 #include "chromeos/ime/input_method_manager.h" |
| 104 #include "chromeos/ime/xkeyboard.h" | 104 #include "chromeos/ime/xkeyboard.h" |
| 105 #include "chromeos/login/login_state.h" | 105 #include "chromeos/login/login_state.h" |
| 106 #include "chromeos/network/geolocation_handler.h" | 106 #include "chromeos/network/geolocation_handler.h" |
| 107 #include "chromeos/network/managed_network_configuration_handler.h" | 107 #include "chromeos/network/managed_network_configuration_handler.h" |
| 108 #include "chromeos/network/network_change_notifier_chromeos.h" | 108 #include "chromeos/network/network_change_notifier_chromeos.h" |
| 109 #include "chromeos/network/network_change_notifier_factory_chromeos.h" | 109 #include "chromeos/network/network_change_notifier_factory_chromeos.h" |
| 110 #include "chromeos/network/network_configuration_handler.h" | 110 #include "chromeos/network/network_configuration_handler.h" |
| 111 #include "chromeos/network/network_event_log.h" | 111 #include "chromeos/network/network_event_log.h" |
| 112 #include "chromeos/network/network_profile_handler.h" |
| 112 #include "chromeos/network/network_state_handler.h" | 113 #include "chromeos/network/network_state_handler.h" |
| 113 #include "content/public/browser/browser_thread.h" | 114 #include "content/public/browser/browser_thread.h" |
| 114 #include "content/public/browser/notification_service.h" | 115 #include "content/public/browser/notification_service.h" |
| 115 #include "content/public/browser/power_save_blocker.h" | 116 #include "content/public/browser/power_save_blocker.h" |
| 116 #include "content/public/common/main_function_params.h" | 117 #include "content/public/common/main_function_params.h" |
| 117 #include "grit/platform_locale_settings.h" | 118 #include "grit/platform_locale_settings.h" |
| 118 #include "net/base/network_change_notifier.h" | 119 #include "net/base/network_change_notifier.h" |
| 119 #include "net/url_request/url_request.h" | 120 #include "net/url_request/url_request.h" |
| 120 #include "net/url_request/url_request_context_getter.h" | 121 #include "net/url_request/url_request_context_getter.h" |
| 121 | 122 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 cryptohome::AsyncMethodCaller::Initialize(); | 309 cryptohome::AsyncMethodCaller::Initialize(); |
| 309 | 310 |
| 310 chromeos::LoginState::Initialize(); | 311 chromeos::LoginState::Initialize(); |
| 311 | 312 |
| 312 // Always initialize these handlers which should not conflict with | 313 // Always initialize these handlers which should not conflict with |
| 313 // NetworkLibrary. | 314 // NetworkLibrary. |
| 314 chromeos::network_event_log::Initialize(); | 315 chromeos::network_event_log::Initialize(); |
| 315 chromeos::GeolocationHandler::Initialize(); | 316 chromeos::GeolocationHandler::Initialize(); |
| 316 chromeos::NetworkStateHandler::Initialize(); | 317 chromeos::NetworkStateHandler::Initialize(); |
| 317 | 318 |
| 319 chromeos::NetworkProfileHandler* profile_handler = |
| 320 chromeos::NetworkProfileHandler::Initialize(); |
| 318 chromeos::NetworkConfigurationHandler::Initialize(); | 321 chromeos::NetworkConfigurationHandler::Initialize(); |
| 319 chromeos::ManagedNetworkConfigurationHandler::Initialize(); | 322 chromeos::ManagedNetworkConfigurationHandler::Initialize( |
| 323 profile_handler); |
| 320 | 324 |
| 321 // Initialize the network change notifier for Chrome OS. The network | 325 // Initialize the network change notifier for Chrome OS. The network |
| 322 // change notifier starts to monitor changes from the power manager and | 326 // change notifier starts to monitor changes from the power manager and |
| 323 // the network manager. | 327 // the network manager. |
| 324 if (CommandLine::ForCurrentProcess()->HasSwitch( | 328 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 325 chromeos::switches::kEnableNewNetworkChangeNotifier)) { | 329 chromeos::switches::kEnableNewNetworkChangeNotifier)) { |
| 326 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); | 330 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); |
| 327 } else { | 331 } else { |
| 328 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); | 332 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); |
| 329 } | 333 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 353 // CrosLibrary is shut down before DBusThreadManager even though it | 357 // CrosLibrary is shut down before DBusThreadManager even though it |
| 354 // is initialized first becuase some of its libraries depend on DBus | 358 // is initialized first becuase some of its libraries depend on DBus |
| 355 // clients. | 359 // clients. |
| 356 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. | 360 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. |
| 357 // (crosbug.com/26160) | 361 // (crosbug.com/26160) |
| 358 if (cros_initialized_ && CrosLibrary::Get()) | 362 if (cros_initialized_ && CrosLibrary::Get()) |
| 359 CrosLibrary::Shutdown(); | 363 CrosLibrary::Shutdown(); |
| 360 | 364 |
| 361 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); | 365 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); |
| 362 chromeos::NetworkConfigurationHandler::Shutdown(); | 366 chromeos::NetworkConfigurationHandler::Shutdown(); |
| 367 chromeos::NetworkProfileHandler::Shutdown(); |
| 363 | 368 |
| 364 chromeos::NetworkStateHandler::Shutdown(); | 369 chromeos::NetworkStateHandler::Shutdown(); |
| 365 chromeos::GeolocationHandler::Shutdown(); | 370 chromeos::GeolocationHandler::Shutdown(); |
| 366 chromeos::network_event_log::Shutdown(); | 371 chromeos::network_event_log::Shutdown(); |
| 367 | 372 |
| 368 chromeos::LoginState::Shutdown(); | 373 chromeos::LoginState::Shutdown(); |
| 369 | 374 |
| 370 cryptohome::AsyncMethodCaller::Shutdown(); | 375 cryptohome::AsyncMethodCaller::Shutdown(); |
| 371 disks::DiskMountManager::Shutdown(); | 376 disks::DiskMountManager::Shutdown(); |
| 372 input_method::Shutdown(); | 377 input_method::Shutdown(); |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 889 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
| 885 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 890 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
| 886 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 891 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
| 887 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 892 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
| 888 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 893 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
| 889 // This is necessary to start the experiment as a side effect. | 894 // This is necessary to start the experiment as a side effect. |
| 890 trial->group(); | 895 trial->group(); |
| 891 } | 896 } |
| 892 | 897 |
| 893 } // namespace chromeos | 898 } // namespace chromeos |
| OLD | NEW |