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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // but the proxy is determined by user policy. | 145 // but the proxy is determined by user policy. |
146 // See https://crbug.com/454966 . | 146 // See https://crbug.com/454966 . |
147 VLOG(1) << "Respect proxy from user policy although network is shared."; | 147 VLOG(1) << "Respect proxy from user policy although network is shared."; |
148 return false; | 148 return false; |
149 } | 149 } |
150 if (onc_source == ::onc::ONC_SOURCE_DEVICE_POLICY) { | 150 if (onc_source == ::onc::ONC_SOURCE_DEVICE_POLICY) { |
151 policy::BrowserPolicyConnectorChromeOS* connector = | 151 policy::BrowserPolicyConnectorChromeOS* connector = |
152 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 152 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
153 const user_manager::User* logged_in_user = | 153 const user_manager::User* logged_in_user = |
154 user_manager::UserManager::Get()->GetLoggedInUser(); | 154 user_manager::UserManager::Get()->GetLoggedInUser(); |
155 if (connector->GetUserAffiliation(logged_in_user->email()) == | 155 if (connector->GetUserAffiliation(logged_in_user->GetUserID()) == |
156 policy::USER_AFFILIATION_MANAGED) { | 156 policy::USER_AFFILIATION_MANAGED) { |
157 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 " |
158 << "the domain the device is enrolled to."; | 158 << "the domain the device is enrolled to."; |
159 return false; | 159 return false; |
160 } | 160 } |
161 } | 161 } |
162 | 162 |
163 // This network is shared and not managed by the user's domain. | 163 // This network is shared and not managed by the user's domain. |
164 bool use_shared_proxies = profile_prefs->GetBoolean(prefs::kUseSharedProxies); | 164 bool use_shared_proxies = profile_prefs->GetBoolean(prefs::kUseSharedProxies); |
165 VLOG(1) << "Use proxy of shared network: " << use_shared_proxies; | 165 VLOG(1) << "Use proxy of shared network: " << use_shared_proxies; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 if (VLOG_IS_ON(1) && !update_pending()) { // Update was successful. | 232 if (VLOG_IS_ON(1) && !update_pending()) { // Update was successful. |
233 scoped_ptr<base::DictionaryValue> config_dict(effective_config.ToValue()); | 233 scoped_ptr<base::DictionaryValue> config_dict(effective_config.ToValue()); |
234 VLOG(1) << this << ": Proxy changed: " | 234 VLOG(1) << this << ": Proxy changed: " |
235 << ProxyPrefs::ConfigStateToDebugString(active_config_state_) | 235 << ProxyPrefs::ConfigStateToDebugString(active_config_state_) |
236 << ", " << *config_dict; | 236 << ", " << *config_dict; |
237 } | 237 } |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 } // namespace chromeos | 241 } // namespace chromeos |
OLD | NEW |