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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 chromeos::input_method::Initialize(); | 255 chromeos::input_method::Initialize(); |
256 disks::DiskMountManager::Initialize(); | 256 disks::DiskMountManager::Initialize(); |
257 cryptohome::AsyncMethodCaller::Initialize(); | 257 cryptohome::AsyncMethodCaller::Initialize(); |
258 | 258 |
259 // Always initialize these handlers which should not conflict with | 259 // Always initialize these handlers which should not conflict with |
260 // NetworkLibrary. | 260 // NetworkLibrary. |
261 chromeos::network_event_log::Initialize(); | 261 chromeos::network_event_log::Initialize(); |
262 chromeos::GeolocationHandler::Initialize(); | 262 chromeos::GeolocationHandler::Initialize(); |
263 chromeos::NetworkStateHandler::Initialize(); | 263 chromeos::NetworkStateHandler::Initialize(); |
264 | 264 |
265 if (CommandLine::ForCurrentProcess()->HasSwitch( | 265 chromeos::NetworkConfigurationHandler::Initialize(); |
266 chromeos::switches::kEnableNewNetworkConfigurationHandlers)) { | 266 chromeos::ManagedNetworkConfigurationHandler::Initialize(); |
267 chromeos::NetworkConfigurationHandler::Initialize(); | |
268 chromeos::ManagedNetworkConfigurationHandler::Initialize(); | |
269 } | |
270 | 267 |
271 // Initialize the network change notifier for Chrome OS. The network | 268 // Initialize the network change notifier for Chrome OS. The network |
272 // change notifier starts to monitor changes from the power manager and | 269 // change notifier starts to monitor changes from the power manager and |
273 // the network manager. | 270 // the network manager. |
274 if (CommandLine::ForCurrentProcess()->HasSwitch( | 271 if (CommandLine::ForCurrentProcess()->HasSwitch( |
275 chromeos::switches::kEnableNewNetworkChangeNotifier)) { | 272 chromeos::switches::kEnableNewNetworkChangeNotifier)) { |
276 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); | 273 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); |
277 } else { | 274 } else { |
278 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); | 275 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); |
279 } | 276 } |
(...skipping 17 matching lines...) Expand all Loading... |
297 | 294 |
298 ~DBusServices() { | 295 ~DBusServices() { |
299 // CrosLibrary is shut down before DBusThreadManager even though it | 296 // CrosLibrary is shut down before DBusThreadManager even though it |
300 // is initialized first becuase some of its libraries depend on DBus | 297 // is initialized first becuase some of its libraries depend on DBus |
301 // clients. | 298 // clients. |
302 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. | 299 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. |
303 // (crosbug.com/26160) | 300 // (crosbug.com/26160) |
304 if (cros_initialized_ && CrosLibrary::Get()) | 301 if (cros_initialized_ && CrosLibrary::Get()) |
305 CrosLibrary::Shutdown(); | 302 CrosLibrary::Shutdown(); |
306 | 303 |
307 if (CommandLine::ForCurrentProcess()->HasSwitch( | 304 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); |
308 chromeos::switches::kEnableNewNetworkConfigurationHandlers)) { | 305 chromeos::NetworkConfigurationHandler::Shutdown(); |
309 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); | |
310 chromeos::NetworkConfigurationHandler::Shutdown(); | |
311 } | |
312 | 306 |
313 chromeos::ConnectivityStateHelper::Shutdown(); | 307 chromeos::ConnectivityStateHelper::Shutdown(); |
314 chromeos::NetworkStateHandler::Shutdown(); | 308 chromeos::NetworkStateHandler::Shutdown(); |
315 chromeos::GeolocationHandler::Shutdown(); | 309 chromeos::GeolocationHandler::Shutdown(); |
316 chromeos::network_event_log::Shutdown(); | 310 chromeos::network_event_log::Shutdown(); |
317 | 311 |
318 cryptohome::AsyncMethodCaller::Shutdown(); | 312 cryptohome::AsyncMethodCaller::Shutdown(); |
319 disks::DiskMountManager::Shutdown(); | 313 disks::DiskMountManager::Shutdown(); |
320 input_method::Shutdown(); | 314 input_method::Shutdown(); |
321 CrosDBusService::Shutdown(); | 315 CrosDBusService::Shutdown(); |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 811 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
818 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 812 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
819 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 813 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
820 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 814 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
821 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 815 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
822 // This is necessary to start the experiment as a side effect. | 816 // This is necessary to start the experiment as a side effect. |
823 trial->group(); | 817 trial->group(); |
824 } | 818 } |
825 | 819 |
826 } // namespace chromeos | 820 } // namespace chromeos |
OLD | NEW |