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