OLD | NEW |
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 Loading... |
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 |
OLD | NEW |