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

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: Address feedback, remove configuration. 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_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"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
328 NetworkConfigurationHandler::Initialize(); 329 NetworkConfigurationHandler::Initialize();
329 ManagedNetworkConfigurationHandler::Initialize(); 330 ManagedNetworkConfigurationHandler::Initialize();
331 NetworkConnectionHandler::Initialize();
330 332
331 // Initialize the network change notifier for Chrome OS. The network 333 // Initialize the network change notifier for Chrome OS. The network
332 // change notifier starts to monitor changes from the power manager and 334 // change notifier starts to monitor changes from the power manager and
333 // the network manager. 335 // the network manager.
334 if (!CommandLine::ForCurrentProcess()->HasSwitch( 336 if (!CommandLine::ForCurrentProcess()->HasSwitch(
335 chromeos::switches::kDisableNewNetworkChangeNotifier)) { 337 chromeos::switches::kDisableNewNetworkChangeNotifier)) {
336 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize(); 338 NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize();
337 } else { 339 } else {
338 CrosNetworkChangeNotifierFactory::GetInstance()->Init(); 340 CrosNetworkChangeNotifierFactory::GetInstance()->Init();
339 } 341 }
(...skipping 21 matching lines...) Expand all
361 ~DBusServices() { 363 ~DBusServices() {
362 ConnectivityStateHelper::Shutdown(); 364 ConnectivityStateHelper::Shutdown();
363 // CrosLibrary is shut down before DBusThreadManager even though it 365 // CrosLibrary is shut down before DBusThreadManager even though it
364 // is initialized first becuase some of its libraries depend on DBus 366 // is initialized first becuase some of its libraries depend on DBus
365 // clients. 367 // clients.
366 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. 368 // TODO(hashimoto): Resolve this situation by removing CrosLibrary.
367 // (crosbug.com/26160) 369 // (crosbug.com/26160)
368 if (cros_initialized_ && CrosLibrary::Get()) 370 if (cros_initialized_ && CrosLibrary::Get())
369 CrosLibrary::Shutdown(); 371 CrosLibrary::Shutdown();
370 372
373 NetworkConnectionHandler::Shutdown();
371 ManagedNetworkConfigurationHandler::Shutdown(); 374 ManagedNetworkConfigurationHandler::Shutdown();
372 NetworkConfigurationHandler::Shutdown(); 375 NetworkConfigurationHandler::Shutdown();
373 376
374 NetworkStateHandler::Shutdown(); 377 NetworkStateHandler::Shutdown();
375 GeolocationHandler::Shutdown(); 378 GeolocationHandler::Shutdown();
376 network_event_log::Shutdown(); 379 network_event_log::Shutdown();
377 380
378 cryptohome::AsyncMethodCaller::Shutdown(); 381 cryptohome::AsyncMethodCaller::Shutdown();
379 disks::DiskMountManager::Shutdown(); 382 disks::DiskMountManager::Shutdown();
380 input_method::Shutdown(); 383 input_method::Shutdown();
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 902 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
900 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 903 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
901 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 904 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
902 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 905 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
903 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 906 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
904 // This is necessary to start the experiment as a side effect. 907 // This is necessary to start the experiment as a side effect.
905 trial->group(); 908 trial->group();
906 } 909 }
907 910
908 } // namespace chromeos 911 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698