| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #include "chrome/common/logging_chrome.h" | 81 #include "chrome/common/logging_chrome.h" |
| 82 #include "chrome/common/pref_names.h" | 82 #include "chrome/common/pref_names.h" |
| 83 #include "chromeos/chromeos_switches.h" | 83 #include "chromeos/chromeos_switches.h" |
| 84 #include "chromeos/cryptohome/async_method_caller.h" | 84 #include "chromeos/cryptohome/async_method_caller.h" |
| 85 #include "chromeos/dbus/dbus_thread_manager.h" | 85 #include "chromeos/dbus/dbus_thread_manager.h" |
| 86 #include "chromeos/dbus/power_manager_client.h" | 86 #include "chromeos/dbus/power_manager_client.h" |
| 87 #include "chromeos/dbus/session_manager_client.h" | 87 #include "chromeos/dbus/session_manager_client.h" |
| 88 #include "chromeos/disks/disk_mount_manager.h" | 88 #include "chromeos/disks/disk_mount_manager.h" |
| 89 #include "chromeos/display/output_configurator.h" | 89 #include "chromeos/display/output_configurator.h" |
| 90 #include "chromeos/network/geolocation_handler.h" | 90 #include "chromeos/network/geolocation_handler.h" |
| 91 #include "chromeos/network/managed_network_configuration_handler.h" |
| 91 #include "chromeos/network/network_change_notifier_chromeos.h" | 92 #include "chromeos/network/network_change_notifier_chromeos.h" |
| 92 #include "chromeos/network/network_change_notifier_factory_chromeos.h" | 93 #include "chromeos/network/network_change_notifier_factory_chromeos.h" |
| 93 #include "chromeos/network/network_configuration_handler.h" | 94 #include "chromeos/network/network_configuration_handler.h" |
| 94 #include "chromeos/network/network_device_handler.h" | 95 #include "chromeos/network/network_device_handler.h" |
| 95 #include "chromeos/network/network_event_log.h" | 96 #include "chromeos/network/network_event_log.h" |
| 96 #include "chromeos/network/network_state_handler.h" | 97 #include "chromeos/network/network_state_handler.h" |
| 97 #include "chromeos/power/power_state_override.h" | 98 #include "chromeos/power/power_state_override.h" |
| 98 #include "content/public/browser/notification_service.h" | 99 #include "content/public/browser/notification_service.h" |
| 99 #include "content/public/common/main_function_params.h" | 100 #include "content/public/common/main_function_params.h" |
| 100 #include "grit/platform_locale_settings.h" | 101 #include "grit/platform_locale_settings.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 // Always initialize these handlers which should not conflict with | 291 // Always initialize these handlers which should not conflict with |
| 291 // NetworkLibrary. | 292 // NetworkLibrary. |
| 292 chromeos::network_event_log::Initialize(); | 293 chromeos::network_event_log::Initialize(); |
| 293 chromeos::GeolocationHandler::Initialize(); | 294 chromeos::GeolocationHandler::Initialize(); |
| 294 | 295 |
| 295 if (CommandLine::ForCurrentProcess()->HasSwitch( | 296 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 296 chromeos::switches::kEnableNewNetworkHandlers)) { | 297 chromeos::switches::kEnableNewNetworkHandlers)) { |
| 297 chromeos::NetworkDeviceHandler::Initialize(); | 298 chromeos::NetworkDeviceHandler::Initialize(); |
| 298 chromeos::NetworkStateHandler::Initialize(); | 299 chromeos::NetworkStateHandler::Initialize(); |
| 299 chromeos::NetworkConfigurationHandler::Initialize(); | 300 chromeos::NetworkConfigurationHandler::Initialize(); |
| 301 chromeos::ManagedNetworkConfigurationHandler::Initialize(); |
| 300 // TODO(gauravsh): This needs re-factoring. NetworkChangeNotifier choice | 302 // TODO(gauravsh): This needs re-factoring. NetworkChangeNotifier choice |
| 301 // needs to be made before about:flags are processed. | 303 // needs to be made before about:flags are processed. |
| 302 if (use_new_network_change_notifier_) | 304 if (use_new_network_change_notifier_) |
| 303 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); | 305 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); |
| 304 } | 306 } |
| 305 } | 307 } |
| 306 | 308 |
| 307 ~DBusServices() { | 309 ~DBusServices() { |
| 308 // CrosLibrary is shut down before DBusThreadManager even though it | 310 // CrosLibrary is shut down before DBusThreadManager even though it |
| 309 // is initialized first becuase some of its libraries depend on DBus | 311 // is initialized first becuase some of its libraries depend on DBus |
| 310 // clients. | 312 // clients. |
| 311 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. | 313 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. |
| 312 // (crosbug.com/26160) | 314 // (crosbug.com/26160) |
| 313 if (cros_initialized_ && CrosLibrary::Get()) | 315 if (cros_initialized_ && CrosLibrary::Get()) |
| 314 CrosLibrary::Shutdown(); | 316 CrosLibrary::Shutdown(); |
| 315 | 317 |
| 316 chromeos::ConnectivityStateHelper::Shutdown(); | 318 chromeos::ConnectivityStateHelper::Shutdown(); |
| 317 if (network_handlers_initialized_) { | 319 if (network_handlers_initialized_) { |
| 320 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); |
| 321 chromeos::NetworkConfigurationHandler::Shutdown(); |
| 318 if (CommandLine::ForCurrentProcess()->HasSwitch( | 322 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 319 chromeos::switches::kEnableNewNetworkHandlers)) { | 323 chromeos::switches::kEnableNewNetworkHandlers)) { |
| 320 chromeos::NetworkDeviceHandler::Shutdown(); | 324 chromeos::NetworkDeviceHandler::Shutdown(); |
| 321 chromeos::NetworkStateHandler::Shutdown(); | 325 chromeos::NetworkStateHandler::Shutdown(); |
| 322 chromeos::NetworkConfigurationHandler::Shutdown(); | 326 chromeos::NetworkConfigurationHandler::Shutdown(); |
| 323 } | 327 } |
| 324 | 328 |
| 325 chromeos::GeolocationHandler::Shutdown(); | 329 chromeos::GeolocationHandler::Shutdown(); |
| 326 chromeos::network_event_log::Shutdown(); | 330 chromeos::network_event_log::Shutdown(); |
| 327 } | 331 } |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 831 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
| 828 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 832 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
| 829 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 833 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
| 830 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 834 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
| 831 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 835 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
| 832 // This is necessary to start the experiment as a side effect. | 836 // This is necessary to start the experiment as a side effect. |
| 833 trial->group(); | 837 trial->group(); |
| 834 } | 838 } |
| 835 | 839 |
| 836 } // namespace chromeos | 840 } // namespace chromeos |
| OLD | NEW |