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 "chrome/browser/chromeos/ui_proxy_config_service.h" | 5 #include "chrome/browser/chromeos/ui_proxy_config_service.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/chromeos/net/proxy_config_handler.h" | 10 #include "chrome/browser/chromeos/net/proxy_config_handler.h" |
11 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | 11 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
12 #include "chromeos/network/network_state.h" | 12 #include "chromeos/network/network_state.h" |
13 #include "chromeos/network/network_state_handler.h" | 13 #include "chromeos/network/network_state_handler.h" |
14 #include "grit/generated_resources.h" | |
15 #include "net/proxy/proxy_config.h" | 14 #include "net/proxy/proxy_config.h" |
16 | 15 |
17 namespace chromeos { | 16 namespace chromeos { |
18 | 17 |
19 namespace { | 18 namespace { |
20 | 19 |
21 const char* ModeToString(UIProxyConfig::Mode mode) { | 20 const char* ModeToString(UIProxyConfig::Mode mode) { |
22 switch (mode) { | 21 switch (mode) { |
23 case UIProxyConfig::MODE_DIRECT: | 22 case UIProxyConfig::MODE_DIRECT: |
24 return "direct"; | 23 return "direct"; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } else if (!IsNetworkProxySettingsEditable(onc_source)) { | 177 } else if (!IsNetworkProxySettingsEditable(onc_source)) { |
179 current_ui_config_.state = ProxyPrefs::CONFIG_POLICY; | 178 current_ui_config_.state = ProxyPrefs::CONFIG_POLICY; |
180 current_ui_config_.user_modifiable = false; | 179 current_ui_config_.user_modifiable = false; |
181 } else { | 180 } else { |
182 current_ui_config_.user_modifiable = !ProxyConfigServiceImpl::IgnoreProxy( | 181 current_ui_config_.user_modifiable = !ProxyConfigServiceImpl::IgnoreProxy( |
183 profile_prefs_, network.profile_path(), onc_source); | 182 profile_prefs_, network.profile_path(), onc_source); |
184 } | 183 } |
185 } | 184 } |
186 | 185 |
187 } // namespace chromeos | 186 } // namespace chromeos |
OLD | NEW |