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

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: fix test case and xml formatting 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 base::ListValue* urls = new base::ListValue();
bartfab (slow) 2016/05/02 10:30:28 Nit 1: const pointer. Nit 2: A unique_ptr would be
Kevin Cernekee 2016/05/02 20:02:29 1) Done 2) Don't think that will work here, becaus
bartfab (slow) 2016/05/03 16:14:15 Sure, you need to relase() when hading over owners
Kevin Cernekee 2016/05/03 17:54:54 Done.
333 RepeatedPtrField<std::string>::const_iterator entry;
334 for (entry = container.urls().begin(); entry != container.urls().end();
335 ++entry) {
336 urls->Append(new base::StringValue(*entry));
337 }
338 policies->Set(key::kLoginVideoCaptureAllowedUrls, POLICY_LEVEL_MANDATORY,
339 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, urls, nullptr);
340 }
328 } 341 }
329 342
330 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy, 343 void DecodeNetworkPolicies(const em::ChromeDeviceSettingsProto& policy,
331 PolicyMap* policies) { 344 PolicyMap* policies) {
332 if (policy.has_data_roaming_enabled()) { 345 if (policy.has_data_roaming_enabled()) {
333 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled()); 346 const em::DataRoamingEnabledProto& container(policy.data_roaming_enabled());
334 if (container.has_data_roaming_enabled()) { 347 if (container.has_data_roaming_enabled()) {
335 policies->Set(key::kDeviceDataRoamingEnabled, 348 policies->Set(key::kDeviceDataRoamingEnabled,
336 POLICY_LEVEL_MANDATORY, 349 POLICY_LEVEL_MANDATORY,
337 POLICY_SCOPE_MACHINE, 350 POLICY_SCOPE_MACHINE,
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 // Decode the various groups of policies. 935 // Decode the various groups of policies.
923 DecodeLoginPolicies(policy, policies); 936 DecodeLoginPolicies(policy, policies);
924 DecodeNetworkPolicies(policy, policies); 937 DecodeNetworkPolicies(policy, policies);
925 DecodeReportingPolicies(policy, policies); 938 DecodeReportingPolicies(policy, policies);
926 DecodeAutoUpdatePolicies(policy, policies); 939 DecodeAutoUpdatePolicies(policy, policies);
927 DecodeAccessibilityPolicies(policy, policies); 940 DecodeAccessibilityPolicies(policy, policies);
928 DecodeGenericPolicies(policy, policies); 941 DecodeGenericPolicies(policy, policies);
929 } 942 }
930 943
931 } // namespace policy 944 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698