| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/proxy_config_service_impl.h" | 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 ->network_profile_handler()->GetProfileForPath(network_profile_path); | 133 ->network_profile_handler()->GetProfileForPath(network_profile_path); |
| 134 if (!profile) { | 134 if (!profile) { |
| 135 VLOG(1) << "Unknown profile_path '" << network_profile_path | 135 VLOG(1) << "Unknown profile_path '" << network_profile_path |
| 136 << "'. Ignoring proxy."; | 136 << "'. Ignoring proxy."; |
| 137 return true; | 137 return true; |
| 138 } | 138 } |
| 139 if (profile->type() == NetworkProfile::TYPE_USER) { | 139 if (profile->type() == NetworkProfile::TYPE_USER) { |
| 140 VLOG(1) << "Respect proxy of not-shared networks."; | 140 VLOG(1) << "Respect proxy of not-shared networks."; |
| 141 return false; | 141 return false; |
| 142 } | 142 } |
| 143 if (onc_source == ::onc::ONC_SOURCE_USER_POLICY) { |
| 144 // Note that this case can occur if the network is shared (e.g. ethernet) |
| 145 // but the proxy is determined by user policy. |
| 146 // See https://crbug.com/454966 . |
| 147 VLOG(1) << "Respect proxy from user policy although network is shared."; |
| 148 return false; |
| 149 } |
| 143 if (onc_source == ::onc::ONC_SOURCE_DEVICE_POLICY) { | 150 if (onc_source == ::onc::ONC_SOURCE_DEVICE_POLICY) { |
| 144 policy::BrowserPolicyConnectorChromeOS* connector = | 151 policy::BrowserPolicyConnectorChromeOS* connector = |
| 145 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 152 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 146 const user_manager::User* logged_in_user = | 153 const user_manager::User* logged_in_user = |
| 147 user_manager::UserManager::Get()->GetLoggedInUser(); | 154 user_manager::UserManager::Get()->GetLoggedInUser(); |
| 148 if (connector->GetUserAffiliation(logged_in_user->email()) == | 155 if (connector->GetUserAffiliation(logged_in_user->email()) == |
| 149 policy::USER_AFFILIATION_MANAGED) { | 156 policy::USER_AFFILIATION_MANAGED) { |
| 150 VLOG(1) << "Respecting proxy for network, as logged-in user belongs to " | 157 VLOG(1) << "Respecting proxy for network, as logged-in user belongs to " |
| 151 << "the domain the device is enrolled to."; | 158 << "the domain the device is enrolled to."; |
| 152 return false; | 159 return false; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 if (VLOG_IS_ON(1) && !update_pending()) { // Update was successful. | 232 if (VLOG_IS_ON(1) && !update_pending()) { // Update was successful. |
| 226 scoped_ptr<base::DictionaryValue> config_dict(effective_config.ToValue()); | 233 scoped_ptr<base::DictionaryValue> config_dict(effective_config.ToValue()); |
| 227 VLOG(1) << this << ": Proxy changed: " | 234 VLOG(1) << this << ": Proxy changed: " |
| 228 << ProxyPrefs::ConfigStateToDebugString(active_config_state_) | 235 << ProxyPrefs::ConfigStateToDebugString(active_config_state_) |
| 229 << ", " << *config_dict; | 236 << ", " << *config_dict; |
| 230 } | 237 } |
| 231 } | 238 } |
| 232 } | 239 } |
| 233 | 240 |
| 234 } // namespace chromeos | 241 } // namespace chromeos |
| OLD | NEW |