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

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

Issue 2544693002: [Chrome OS] Add a chrome os device wallpaper policy. (Closed)
Patch Set: Address pastarmovj@'s comments. Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/proto/chrome_device_policy.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 const em::DeviceQuirksDownloadEnabledProto& container( 833 const em::DeviceQuirksDownloadEnabledProto& container(
834 policy.quirks_download_enabled()); 834 policy.quirks_download_enabled());
835 if (container.has_quirks_download_enabled()) { 835 if (container.has_quirks_download_enabled()) {
836 policies->Set(key::kDeviceQuirksDownloadEnabled, POLICY_LEVEL_MANDATORY, 836 policies->Set(key::kDeviceQuirksDownloadEnabled, POLICY_LEVEL_MANDATORY,
837 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, 837 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
838 base::MakeUnique<base::FundamentalValue>( 838 base::MakeUnique<base::FundamentalValue>(
839 container.quirks_download_enabled()), 839 container.quirks_download_enabled()),
840 nullptr); 840 nullptr);
841 } 841 }
842 } 842 }
843
844 if (policy.has_device_wallpaper_image()) {
845 const em::DeviceWallpaperImageProto& container(
846 policy.device_wallpaper_image());
847 if (container.has_device_wallpaper_image()) {
848 std::unique_ptr<base::DictionaryValue> dict_val =
849 base::DictionaryValue::From(
850 base::JSONReader::Read(container.device_wallpaper_image()));
851 policies->Set(key::kDeviceWallpaperImage, POLICY_LEVEL_MANDATORY,
852 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
853 std::move(dict_val), nullptr);
854 }
855 }
843 } 856 }
844 857
845 } // namespace 858 } // namespace
846 859
847 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, 860 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy,
848 PolicyMap* policies) { 861 PolicyMap* policies) {
849 // Decode the various groups of policies. 862 // Decode the various groups of policies.
850 DecodeLoginPolicies(policy, policies); 863 DecodeLoginPolicies(policy, policies);
851 DecodeNetworkPolicies(policy, policies); 864 DecodeNetworkPolicies(policy, policies);
852 DecodeReportingPolicies(policy, policies); 865 DecodeReportingPolicies(policy, policies);
853 DecodeAutoUpdatePolicies(policy, policies); 866 DecodeAutoUpdatePolicies(policy, policies);
854 DecodeAccessibilityPolicies(policy, policies); 867 DecodeAccessibilityPolicies(policy, policies);
855 DecodeGenericPolicies(policy, policies); 868 DecodeGenericPolicies(policy, policies);
856 } 869 }
857 870
858 } // namespace policy 871 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/proto/chrome_device_policy.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698