Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 14566009: Add NetworkConnectionHandler class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert Associating Stub change for test Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 #include "chromeos/disks/disk_mount_manager.h" 104 #include "chromeos/disks/disk_mount_manager.h"
105 #include "chromeos/ime/input_method_manager.h" 105 #include "chromeos/ime/input_method_manager.h"
106 #include "chromeos/ime/xkeyboard.h" 106 #include "chromeos/ime/xkeyboard.h"
107 #include "chromeos/login/login_state.h" 107 #include "chromeos/login/login_state.h"
108 #include "chromeos/network/cert_loader.h" 108 #include "chromeos/network/cert_loader.h"
109 #include "chromeos/network/geolocation_handler.h" 109 #include "chromeos/network/geolocation_handler.h"
110 #include "chromeos/network/managed_network_configuration_handler.h" 110 #include "chromeos/network/managed_network_configuration_handler.h"
111 #include "chromeos/network/network_change_notifier_chromeos.h" 111 #include "chromeos/network/network_change_notifier_chromeos.h"
112 #include "chromeos/network/network_change_notifier_factory_chromeos.h" 112 #include "chromeos/network/network_change_notifier_factory_chromeos.h"
113 #include "chromeos/network/network_configuration_handler.h" 113 #include "chromeos/network/network_configuration_handler.h"
114 #include "chromeos/network/network_connection_handler.h"
114 #include "chromeos/network/network_event_log.h" 115 #include "chromeos/network/network_event_log.h"
115 #include "chromeos/network/network_profile_handler.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"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 // Always initialize these handlers which should not conflict with 318 // Always initialize these handlers which should not conflict with
318 // NetworkLibrary. 319 // NetworkLibrary.
319 network_event_log::Initialize(); 320 network_event_log::Initialize();
320 GeolocationHandler::Initialize(); 321 GeolocationHandler::Initialize();
321 NetworkStateHandler::Initialize(); 322 NetworkStateHandler::Initialize();
322 323
323 NetworkProfileHandler* profile_handler = 324 NetworkProfileHandler* profile_handler =
324 NetworkProfileHandler::Initialize(); 325 NetworkProfileHandler::Initialize();
325 NetworkConfigurationHandler::Initialize(); 326 NetworkConfigurationHandler::Initialize();
326 ManagedNetworkConfigurationHandler::Initialize(profile_handler); 327 ManagedNetworkConfigurationHandler::Initialize(profile_handler);
328 NetworkConnectionHandler::Initialize();
327 329
328 // Initialize the network change notifier for Chrome OS. The network 330 // Initialize the network change notifier for Chrome OS. The network
329 // change notifier starts to monitor changes from the power manager and 331 // change notifier starts to monitor changes from the power manager and
330 // the network manager. 332 // the network manager.
331 if (!CommandLine::ForCurrentProcess()->HasSwitch( 333 if (!CommandLine::ForCurrentProcess()->HasSwitch(
332 chromeos::switches::kDisableNewNetworkChangeNotifier)) { 334 chromeos::switches::kDisableNewNetworkChangeNotifier)) {
333 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); 335 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize();
334 } else { 336 } else {
335 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); 337 CrosNetworkChangeNotifierFactory::GetInstance()->Init();
336 } 338 }
(...skipping 23 matching lines...) Expand all
360 // CrosLibrary is shut down before DBusThreadManager even though it 362 // CrosLibrary is shut down before DBusThreadManager even though it
361 // is initialized first becuase some of its libraries depend on DBus 363 // is initialized first becuase some of its libraries depend on DBus
362 // clients. 364 // clients.
363 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. 365 // TODO(hashimoto): Resolve this situation by removing CrosLibrary.
364 // (crosbug.com/26160) 366 // (crosbug.com/26160)
365 if (cros_initialized_ && CrosLibrary::Get()) 367 if (cros_initialized_ && CrosLibrary::Get())
366 CrosLibrary::Shutdown(); 368 CrosLibrary::Shutdown();
367 369
368 ManagedNetworkConfigurationHandler::Shutdown(); 370 ManagedNetworkConfigurationHandler::Shutdown();
369 NetworkConfigurationHandler::Shutdown(); 371 NetworkConfigurationHandler::Shutdown();
372 NetworkConnectionHandler::Shutdown();
370 NetworkProfileHandler::Shutdown(); 373 NetworkProfileHandler::Shutdown();
371 374
372 NetworkStateHandler::Shutdown(); 375 NetworkStateHandler::Shutdown();
373 GeolocationHandler::Shutdown(); 376 GeolocationHandler::Shutdown();
374 network_event_log::Shutdown(); 377 network_event_log::Shutdown();
375 378
376 cryptohome::AsyncMethodCaller::Shutdown(); 379 cryptohome::AsyncMethodCaller::Shutdown();
377 disks::DiskMountManager::Shutdown(); 380 disks::DiskMountManager::Shutdown();
378 input_method::Shutdown(); 381 input_method::Shutdown();
379 CryptohomeLibrary::Shutdown(); 382 CryptohomeLibrary::Shutdown();
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 893 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
891 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 894 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
892 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 895 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
893 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 896 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
894 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 897 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
895 // This is necessary to start the experiment as a side effect. 898 // This is necessary to start the experiment as a side effect.
896 trial->group(); 899 trial->group();
897 } 900 }
898 901
899 } // namespace chromeos 902 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698