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

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

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browsertest and removed unnecessary string for default values. Created 5 years, 3 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 NULL); 733 NULL);
734 } 734 }
735 } 735 }
736 736
737 if (policy.has_extension_cache_size()) { 737 if (policy.has_extension_cache_size()) {
738 const em::ExtensionCacheSizeProto& container(policy.extension_cache_size()); 738 const em::ExtensionCacheSizeProto& container(policy.extension_cache_size());
739 if (container.has_extension_cache_size()) { 739 if (container.has_extension_cache_size()) {
740 policies->Set( 740 policies->Set(
741 key::kExtensionCacheSize, POLICY_LEVEL_MANDATORY, 741 key::kExtensionCacheSize, POLICY_LEVEL_MANDATORY,
742 POLICY_SCOPE_MACHINE, 742 POLICY_SCOPE_MACHINE,
743 DecodeIntegerValue(container.extension_cache_size()).release(), 743 DecodeIntegerValue(container.extension_cache_size()).release(), NULL);
Thiemo Nagel 2015/09/01 17:40:36 Don't convert code from nullptr to NULL (only the
fhorschig 2015/09/04 06:53:53 Done. (FYI: These two calls of "policies->Set" are
Thiemo Nagel 2015/09/04 20:15:53 Feel free to submit a CL to convert the remaining
744 nullptr);
745 } 744 }
746 } 745 }
747 746
748 if (policy.has_login_screen_domain_auto_complete()) { 747 if (policy.has_login_screen_domain_auto_complete()) {
749 const em::LoginScreenDomainAutoCompleteProto& container( 748 const em::LoginScreenDomainAutoCompleteProto& container(
750 policy.login_screen_domain_auto_complete()); 749 policy.login_screen_domain_auto_complete());
751 policies->Set( 750 policies->Set(
752 key::kDeviceLoginScreenDomainAutoComplete, POLICY_LEVEL_MANDATORY, 751 key::kDeviceLoginScreenDomainAutoComplete, POLICY_LEVEL_MANDATORY,
753 POLICY_SCOPE_MACHINE, 752 POLICY_SCOPE_MACHINE,
754 new base::StringValue(container.login_screen_domain_auto_complete()), 753 new base::StringValue(container.login_screen_domain_auto_complete()),
755 nullptr); 754 NULL);
756 } 755 }
757 } 756 }
758 757
759 } // namespace 758 } // namespace
760 759
761 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, 760 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy,
762 PolicyMap* policies) { 761 PolicyMap* policies) {
763 // Decode the various groups of policies. 762 // Decode the various groups of policies.
764 DecodeLoginPolicies(policy, policies); 763 DecodeLoginPolicies(policy, policies);
765 DecodeNetworkPolicies(policy, policies); 764 DecodeNetworkPolicies(policy, policies);
766 DecodeReportingPolicies(policy, policies); 765 DecodeReportingPolicies(policy, policies);
767 DecodeAutoUpdatePolicies(policy, policies); 766 DecodeAutoUpdatePolicies(policy, policies);
768 DecodeAccessibilityPolicies(policy, policies); 767 DecodeAccessibilityPolicies(policy, policies);
769 DecodeGenericPolicies(policy, policies); 768 DecodeGenericPolicies(policy, policies);
770 } 769 }
771 770
772 } // namespace policy 771 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698