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

Side by Side Diff: chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc

Issue 1775023002: Enterprise policy to prevent queries to the Quirks Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First round of reviews Created 4 years, 9 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
OLDNEW
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/policy/device_policy_decoder_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 const em::DisplayRotationDefaultProto& container( 815 const em::DisplayRotationDefaultProto& container(
816 policy.display_rotation_default()); 816 policy.display_rotation_default());
817 policies->Set( 817 policies->Set(
818 key::kDisplayRotationDefault, 818 key::kDisplayRotationDefault,
819 POLICY_LEVEL_MANDATORY, 819 POLICY_LEVEL_MANDATORY,
820 POLICY_SCOPE_MACHINE, 820 POLICY_SCOPE_MACHINE,
821 POLICY_SOURCE_CLOUD, 821 POLICY_SOURCE_CLOUD,
822 DecodeIntegerValue(container.display_rotation_default()).release(), 822 DecodeIntegerValue(container.display_rotation_default()).release(),
823 nullptr); 823 nullptr);
824 } 824 }
825
826 if (policy.has_quirks_download_enabled()) {
827 const em::DeviceQuirksDownloadEnabledProto& container(
828 policy.quirks_download_enabled());
829 if (container.has_quirks_download_enabled()) {
Greg Levin 2016/03/14 17:29:47 Is this second "if" statement needed? Some of the
Thiemo Nagel 2016/03/23 14:53:24 It all depends on the policy proto that we receive
Greg Levin 2016/03/24 23:21:39 Acknowledged.
830 policies->Set(
831 key::kDeviceQuirksDownloadEnabled,
832 POLICY_LEVEL_MANDATORY,
833 POLICY_SCOPE_MACHINE,
834 POLICY_SOURCE_CLOUD,
835 new base::FundamentalValue(container.quirks_download_enabled()),
836 NULL);
Greg Levin 2016/03/14 17:29:47 git cl format complained about this block, request
Thiemo Nagel 2016/03/23 14:53:24 I'd agree. Consistency trumps everything.
Greg Levin 2016/03/24 23:21:39 Done.
837 }
838 }
825 } 839 }
826 840
827 } // namespace 841 } // namespace
828 842
829 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, 843 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy,
830 PolicyMap* policies) { 844 PolicyMap* policies) {
831 // Decode the various groups of policies. 845 // Decode the various groups of policies.
832 DecodeLoginPolicies(policy, policies); 846 DecodeLoginPolicies(policy, policies);
833 DecodeNetworkPolicies(policy, policies); 847 DecodeNetworkPolicies(policy, policies);
834 DecodeReportingPolicies(policy, policies); 848 DecodeReportingPolicies(policy, policies);
835 DecodeAutoUpdatePolicies(policy, policies); 849 DecodeAutoUpdatePolicies(policy, policies);
836 DecodeAccessibilityPolicies(policy, policies); 850 DecodeAccessibilityPolicies(policy, policies);
837 DecodeGenericPolicies(policy, policies); 851 DecodeGenericPolicies(policy, policies);
838 } 852 }
839 853
840 } // namespace policy 854 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698