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

Side by Side Diff: chromeos/network/proxy/ui_proxy_config_service.cc

Issue 2471723002: chromeos: networkingPrivate: Set active proxy values (Closed)
Patch Set: Fix test expectations 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_state_handler.cc ('k') | components/onc/onc_constants.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/proxy/ui_proxy_config_service.h" 5 #include "chromeos/network/proxy/ui_proxy_config_service.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } else if (!IsNetworkProxySettingsEditable(onc_source)) { 193 } else if (!IsNetworkProxySettingsEditable(onc_source)) {
194 current_ui_config_.state = ProxyPrefs::CONFIG_POLICY; 194 current_ui_config_.state = ProxyPrefs::CONFIG_POLICY;
195 current_ui_config_.user_modifiable = false; 195 current_ui_config_.user_modifiable = false;
196 } else { 196 } else {
197 current_ui_config_.user_modifiable = !ProxyConfigServiceImpl::IgnoreProxy( 197 current_ui_config_.user_modifiable = !ProxyConfigServiceImpl::IgnoreProxy(
198 profile_prefs_, network.profile_path(), onc_source); 198 profile_prefs_, network.profile_path(), onc_source);
199 } 199 }
200 } 200 }
201 201
202 void UIProxyConfigService::OnPreferenceChanged(const std::string& pref_name) { 202 void UIProxyConfigService::OnPreferenceChanged(const std::string& pref_name) {
203 if (!current_ui_network_guid_.empty()) 203 if (current_ui_network_guid_.empty())
204 UpdateFromPrefs(current_ui_network_guid_); 204 return;
205 const NetworkState* network =
206 NetworkHandler::Get()->network_state_handler()->GetNetworkStateFromGuid(
207 current_ui_network_guid_);
208 if (!network)
209 return;
210 UpdateFromPrefs(current_ui_network_guid_);
211 NetworkHandler::Get()
212 ->network_state_handler()
213 ->SendUpdateNotificationForNetwork(network->path());
205 } 214 }
206 215
207 } // namespace chromeos 216 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | components/onc/onc_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698