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

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

Issue 1936903002: Allow SAML logins to use the webcam (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment to JS re: C++ permission check Created 4 years, 7 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 if (policy.has_allow_bluetooth()) { 319 if (policy.has_allow_bluetooth()) {
320 const em::AllowBluetoothProto& container(policy.allow_bluetooth()); 320 const em::AllowBluetoothProto& container(policy.allow_bluetooth());
321 if (container.has_allow_bluetooth()) { 321 if (container.has_allow_bluetooth()) {
322 policies->Set(key::kDeviceAllowBluetooth, POLICY_LEVEL_MANDATORY, 322 policies->Set(key::kDeviceAllowBluetooth, POLICY_LEVEL_MANDATORY,
323 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, 323 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
324 new base::FundamentalValue(container.allow_bluetooth()), 324 new base::FundamentalValue(container.allow_bluetooth()),
325 nullptr); 325 nullptr);
326 } 326 }
327 } 327 }
328
329 if (policy.has_login_video_capture_allowed_urls()) {
330 const em::LoginVideoCaptureAllowedUrlsProto& container(
331 policy.login_video_capture_allowed_urls());
332 std::unique_ptr<base::ListValue> urls(new base::ListValue());
333 for (const auto& entry : container.urls()) {
334 urls->Append(new base::StringValue(entry));
335 }
336 policies->Set(key::kLoginVideoCaptureAllowedUrls, POLICY_LEVEL_MANDATORY,
337 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, urls.release(),
338 nullptr);
339 }
328 } 340 }
329 341
330 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy, 342 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy,
331 PolicyMap* policies) { 343 PolicyMap* policies) {
332 if (policy.has_data_roaming_enabled()) { 344 if (policy.has_data_roaming_enabled()) {
333 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled()); 345 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled());
334 if (container.has_data_roaming_enabled()) { 346 if (container.has_data_roaming_enabled()) {
335 policies->Set(key::kDeviceDataRoamingEnabled, 347 policies->Set(key::kDeviceDataRoamingEnabled,
336 POLICY_LEVEL_MANDATORY, 348 POLICY_LEVEL_MANDATORY,
337 POLICY_SCOPE_MACHINE, 349 POLICY_SCOPE_MACHINE,
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 // Decode the various groups of policies. 934 // Decode the various groups of policies.
923 DecodeLoginPolicies(policy, policies); 935 DecodeLoginPolicies(policy, policies);
924 DecodeNetworkPolicies(policy, policies); 936 DecodeNetworkPolicies(policy, policies);
925 DecodeReportingPolicies(policy, policies); 937 DecodeReportingPolicies(policy, policies);
926 DecodeAutoUpdatePolicies(policy, policies); 938 DecodeAutoUpdatePolicies(policy, policies);
927 DecodeAccessibilityPolicies(policy, policies); 939 DecodeAccessibilityPolicies(policy, policies);
928 DecodeGenericPolicies(policy, policies); 940 DecodeGenericPolicies(policy, policies);
929 } 941 }
930 942
931 } // namespace policy 943 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_view.cc ('k') | chrome/browser/chromeos/policy/proto/chrome_device_policy.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698