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

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

Issue 2111563002: Device policy for LoginApps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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
« 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 const em::LoginVideoCaptureAllowedUrlsProto& container( 301 const em::LoginVideoCaptureAllowedUrlsProto& container(
302 policy.login_video_capture_allowed_urls()); 302 policy.login_video_capture_allowed_urls());
303 std::unique_ptr<base::ListValue> urls(new base::ListValue()); 303 std::unique_ptr<base::ListValue> urls(new base::ListValue());
304 for (const auto& entry : container.urls()) { 304 for (const auto& entry : container.urls()) {
305 urls->Append(new base::StringValue(entry)); 305 urls->Append(new base::StringValue(entry));
306 } 306 }
307 policies->Set(key::kLoginVideoCaptureAllowedUrls, POLICY_LEVEL_MANDATORY, 307 policies->Set(key::kLoginVideoCaptureAllowedUrls, POLICY_LEVEL_MANDATORY,
308 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, std::move(urls), 308 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, std::move(urls),
309 nullptr); 309 nullptr);
310 } 310 }
311
312 if (policy.has_login_apps()) {
313 const em::LoginAppsProto& login_apps_proto(policy.login_apps());
314 std::unique_ptr<base::ListValue> login_apps(new base::ListValue);
315 for (const auto& login_app : login_apps_proto.login_apps())
316 login_apps->Append(new base::StringValue(login_app));
317 policies->Set(key::kLoginApps, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
318 POLICY_SOURCE_CLOUD, std::move(login_apps), nullptr);
319 }
311 } 320 }
312 321
313 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy, 322 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy,
314 PolicyMap* policies) { 323 PolicyMap* policies) {
315 if (policy.has_data_roaming_enabled()) { 324 if (policy.has_data_roaming_enabled()) {
316 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled()); 325 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled());
317 if (container.has_data_roaming_enabled()) { 326 if (container.has_data_roaming_enabled()) {
318 policies->Set(key::kDeviceDataRoamingEnabled, POLICY_LEVEL_MANDATORY, 327 policies->Set(key::kDeviceDataRoamingEnabled, POLICY_LEVEL_MANDATORY,
319 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, 328 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
320 base::WrapUnique(new base::FundamentalValue( 329 base::WrapUnique(new base::FundamentalValue(
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 // Decode the various groups of policies. 815 // Decode the various groups of policies.
807 DecodeLoginPolicies(policy, policies); 816 DecodeLoginPolicies(policy, policies);
808 DecodeNetworkPolicies(policy, policies); 817 DecodeNetworkPolicies(policy, policies);
809 DecodeReportingPolicies(policy, policies); 818 DecodeReportingPolicies(policy, policies);
810 DecodeAutoUpdatePolicies(policy, policies); 819 DecodeAutoUpdatePolicies(policy, policies);
811 DecodeAccessibilityPolicies(policy, policies); 820 DecodeAccessibilityPolicies(policy, policies);
812 DecodeGenericPolicies(policy, policies); 821 DecodeGenericPolicies(policy, policies);
813 } 822 }
814 823
815 } // namespace policy 824 } // 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