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