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

Side by Side Diff: chrome/browser/policy/device_policy_cache.cc

Issue 7014036: Split the policy refresh rate preference into user- and device-policy refresh rate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 9 years, 6 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/policy/device_policy_cache.h" 5 #include "chrome/browser/policy/device_policy_cache.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 return; 262 return;
263 } 263 }
264 signed_settings_helper_->StartRetrievePolicyOp(this); 264 signed_settings_helper_->StartRetrievePolicyOp(this);
265 } 265 }
266 266
267 // static 267 // static
268 void DevicePolicyCache::DecodeDevicePolicy( 268 void DevicePolicyCache::DecodeDevicePolicy(
269 const em::ChromeDeviceSettingsProto& policy, 269 const em::ChromeDeviceSettingsProto& policy,
270 PolicyMap* mandatory, 270 PolicyMap* mandatory,
271 PolicyMap* recommended) { 271 PolicyMap* recommended) {
272 if (policy.has_policy_refresh_rate()) { 272 if (policy.has_device_policy_refresh_rate()) {
273 const em::DevicePolicyRefreshRateProto container = 273 const em::DevicePolicyRefreshRateProto container =
274 policy.policy_refresh_rate(); 274 policy.device_policy_refresh_rate();
275 if (container.has_policy_refresh_rate()) { 275 if (container.has_device_policy_refresh_rate()) {
276 mandatory->Set(kPolicyPolicyRefreshRate, 276 mandatory->Set(kPolicyDevicePolicyRefreshRate,
277 DecodeIntegerValue(container.policy_refresh_rate())); 277 DecodeIntegerValue(
278 container.device_policy_refresh_rate()));
278 } 279 }
279 } 280 }
280 281
281 if (policy.has_device_proxy_settings()) { 282 if (policy.has_device_proxy_settings()) {
282 const em::DeviceProxySettingsProto container = 283 const em::DeviceProxySettingsProto container =
283 policy.device_proxy_settings(); 284 policy.device_proxy_settings();
284 if (container.has_proxy_mode()) { 285 if (container.has_proxy_mode()) {
285 recommended->Set(kPolicyProxyMode, 286 recommended->Set(kPolicyProxyMode,
286 Value::CreateStringValue(container.proxy_mode())); 287 Value::CreateStringValue(container.proxy_mode()));
287 } 288 }
288 if (container.has_proxy_server()) { 289 if (container.has_proxy_server()) {
289 recommended->Set(kPolicyProxyServer, 290 recommended->Set(kPolicyProxyServer,
290 Value::CreateStringValue(container.proxy_server())); 291 Value::CreateStringValue(container.proxy_server()));
291 } 292 }
292 if (container.has_proxy_pac_url()) { 293 if (container.has_proxy_pac_url()) {
293 recommended->Set(kPolicyProxyPacUrl, 294 recommended->Set(kPolicyProxyPacUrl,
294 Value::CreateStringValue(container.proxy_pac_url())); 295 Value::CreateStringValue(container.proxy_pac_url()));
295 } 296 }
296 if (container.has_proxy_bypass_list()) { 297 if (container.has_proxy_bypass_list()) {
297 recommended->Set(kPolicyProxyBypassList, 298 recommended->Set(kPolicyProxyBypassList,
298 Value::CreateStringValue(container.proxy_bypass_list())); 299 Value::CreateStringValue(container.proxy_bypass_list()));
299 } 300 }
300 } 301 }
301 } 302 }
302 303
303 } // namespace policy 304 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698