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

Side by Side Diff: chromeos/network/network_handler.cc

Issue 2446893008: NetworkHandler: Add ui_proxy_config_service (Closed)
Patch Set: Add NetworkHandler::ShutdownPrefServices Created 4 years, 1 month 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
« no previous file with comments | « chromeos/network/network_handler.h ('k') | chromeos/network/proxy/ui_proxy_config_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chromeos/network/network_handler.h" 5 #include "chromeos/network/network_handler.h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "base/threading/worker_pool.h" 8 #include "base/threading/worker_pool.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "chromeos/network/auto_connect_handler.h" 10 #include "chromeos/network/auto_connect_handler.h"
11 #include "chromeos/network/client_cert_resolver.h" 11 #include "chromeos/network/client_cert_resolver.h"
12 #include "chromeos/network/geolocation_handler.h" 12 #include "chromeos/network/geolocation_handler.h"
13 #include "chromeos/network/managed_network_configuration_handler_impl.h" 13 #include "chromeos/network/managed_network_configuration_handler_impl.h"
14 #include "chromeos/network/network_activation_handler.h" 14 #include "chromeos/network/network_activation_handler.h"
15 #include "chromeos/network/network_cert_migrator.h" 15 #include "chromeos/network/network_cert_migrator.h"
16 #include "chromeos/network/network_configuration_handler.h" 16 #include "chromeos/network/network_configuration_handler.h"
17 #include "chromeos/network/network_connection_handler.h" 17 #include "chromeos/network/network_connection_handler.h"
18 #include "chromeos/network/network_device_handler_impl.h" 18 #include "chromeos/network/network_device_handler_impl.h"
19 #include "chromeos/network/network_profile_handler.h" 19 #include "chromeos/network/network_profile_handler.h"
20 #include "chromeos/network/network_profile_observer.h" 20 #include "chromeos/network/network_profile_observer.h"
21 #include "chromeos/network/network_sms_handler.h" 21 #include "chromeos/network/network_sms_handler.h"
22 #include "chromeos/network/network_state_handler.h" 22 #include "chromeos/network/network_state_handler.h"
23 #include "chromeos/network/network_state_handler_observer.h" 23 #include "chromeos/network/network_state_handler_observer.h"
24 #include "chromeos/network/prohibited_technologies_handler.h" 24 #include "chromeos/network/prohibited_technologies_handler.h"
25 #include "chromeos/network/proxy/ui_proxy_config_service.h"
25 26
26 namespace chromeos { 27 namespace chromeos {
27 28
28 static NetworkHandler* g_network_handler = NULL; 29 static NetworkHandler* g_network_handler = NULL;
29 30
30 NetworkHandler::NetworkHandler() 31 NetworkHandler::NetworkHandler()
31 : task_runner_(base::ThreadTaskRunnerHandle::Get()) { 32 : task_runner_(base::ThreadTaskRunnerHandle::Get()) {
32 CHECK(DBusThreadManager::IsInitialized()); 33 CHECK(DBusThreadManager::IsInitialized());
33 34
34 network_state_handler_.reset(new NetworkStateHandler()); 35 network_state_handler_.reset(new NetworkStateHandler());
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 CHECK(g_network_handler) 106 CHECK(g_network_handler)
106 << "NetworkHandler::Get() called before Initialize()"; 107 << "NetworkHandler::Get() called before Initialize()";
107 return g_network_handler; 108 return g_network_handler;
108 } 109 }
109 110
110 // static 111 // static
111 bool NetworkHandler::IsInitialized() { 112 bool NetworkHandler::IsInitialized() {
112 return g_network_handler; 113 return g_network_handler;
113 } 114 }
114 115
116 void NetworkHandler::InitializePrefServices(
117 PrefService* logged_in_profile_prefs,
118 PrefService* device_prefs) {
119 ui_proxy_config_service_.reset(
120 new UIProxyConfigService(logged_in_profile_prefs, device_prefs));
121 }
122
123 void NetworkHandler::ShutdownPrefServices() {
124 ui_proxy_config_service_.reset();
125 }
126
115 NetworkStateHandler* NetworkHandler::network_state_handler() { 127 NetworkStateHandler* NetworkHandler::network_state_handler() {
116 return network_state_handler_.get(); 128 return network_state_handler_.get();
117 } 129 }
118 130
119 NetworkDeviceHandler* NetworkHandler::network_device_handler() { 131 NetworkDeviceHandler* NetworkHandler::network_device_handler() {
120 return network_device_handler_.get(); 132 return network_device_handler_.get();
121 } 133 }
122 134
123 NetworkProfileHandler* NetworkHandler::network_profile_handler() { 135 NetworkProfileHandler* NetworkHandler::network_profile_handler() {
124 return network_profile_handler_.get(); 136 return network_profile_handler_.get();
(...skipping 22 matching lines...) Expand all
147 159
148 GeolocationHandler* NetworkHandler::geolocation_handler() { 160 GeolocationHandler* NetworkHandler::geolocation_handler() {
149 return geolocation_handler_.get(); 161 return geolocation_handler_.get();
150 } 162 }
151 163
152 ProhibitedTechnologiesHandler* 164 ProhibitedTechnologiesHandler*
153 NetworkHandler::prohibited_technologies_handler() { 165 NetworkHandler::prohibited_technologies_handler() {
154 return prohibited_technologies_handler_.get(); 166 return prohibited_technologies_handler_.get();
155 } 167 }
156 168
169 UIProxyConfigService* NetworkHandler::ui_proxy_config_service() {
170 CHECK(ui_proxy_config_service_.get());
171 return ui_proxy_config_service_.get();
172 }
173
157 } // namespace chromeos 174 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_handler.h ('k') | chromeos/network/proxy/ui_proxy_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698