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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_provider.cc

Issue 1736293002: Added boolean policy to enable deactivation of bluetooth for managed devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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/settings/device_settings_provider.h" 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 kAccountsPrefTransferSAMLCookies, 56 kAccountsPrefTransferSAMLCookies,
57 kAccountsPrefUsers, 57 kAccountsPrefUsers,
58 kAccountsPrefLoginScreenDomainAutoComplete, 58 kAccountsPrefLoginScreenDomainAutoComplete,
59 kAllowRedeemChromeOsRegistrationOffers, 59 kAllowRedeemChromeOsRegistrationOffers,
60 kAllowedConnectionTypesForUpdate, 60 kAllowedConnectionTypesForUpdate,
61 kAttestationForContentProtectionEnabled, 61 kAttestationForContentProtectionEnabled,
62 kDeviceAttestationEnabled, 62 kDeviceAttestationEnabled,
63 kDeviceDisabled, 63 kDeviceDisabled,
64 kDeviceDisabledMessage, 64 kDeviceDisabledMessage,
65 kDeviceOwner, 65 kDeviceOwner,
66 kAllowBluetooth,
66 kDisplayRotationDefault, 67 kDisplayRotationDefault,
67 kExtensionCacheSize, 68 kExtensionCacheSize,
68 kHeartbeatEnabled, 69 kHeartbeatEnabled,
69 kHeartbeatFrequency, 70 kHeartbeatFrequency,
70 kLoginAuthenticationBehavior, 71 kLoginAuthenticationBehavior,
71 kPolicyMissingMitigationMode, 72 kPolicyMissingMitigationMode,
72 kRebootOnShutdown, 73 kRebootOnShutdown,
73 kReleaseChannel, 74 kReleaseChannel,
74 kReleaseChannelDelegated, 75 kReleaseChannelDelegated,
75 kReportDeviceActivityTimes, 76 kReportDeviceActivityTimes,
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 kExtensionCacheSize, 447 kExtensionCacheSize,
447 policy.extension_cache_size().extension_cache_size()); 448 policy.extension_cache_size().extension_cache_size());
448 } 449 }
449 450
450 if (policy.has_display_rotation_default() && 451 if (policy.has_display_rotation_default() &&
451 policy.display_rotation_default().has_display_rotation_default()) { 452 policy.display_rotation_default().has_display_rotation_default()) {
452 new_values_cache->SetInteger( 453 new_values_cache->SetInteger(
453 kDisplayRotationDefault, 454 kDisplayRotationDefault,
454 policy.display_rotation_default().display_rotation_default()); 455 policy.display_rotation_default().display_rotation_default());
455 } 456 }
457
458 new_values_cache->SetBoolean(
459 kAllowBluetooth, policy.has_allow_bluetooth() &&
460 policy.allow_bluetooth().has_allow_bluetooth() &&
461 policy.allow_bluetooth().allow_bluetooth());
456 } 462 }
457 463
458 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy, 464 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy,
459 PrefValueMap* new_values_cache) { 465 PrefValueMap* new_values_cache) {
460 if (!policy.has_device_log_upload_settings()) 466 if (!policy.has_device_log_upload_settings())
461 return; 467 return;
462 468
463 const em::DeviceLogUploadSettingsProto& log_upload_policy = 469 const em::DeviceLogUploadSettingsProto& log_upload_policy =
464 policy.device_log_upload_settings(); 470 policy.device_log_upload_settings();
465 if (log_upload_policy.has_system_log_upload_enabled()) { 471 if (log_upload_policy.has_system_log_upload_enabled()) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 // Notify the observers we are done. 804 // Notify the observers we are done.
799 std::vector<base::Closure> callbacks; 805 std::vector<base::Closure> callbacks;
800 callbacks.swap(callbacks_); 806 callbacks.swap(callbacks_);
801 for (size_t i = 0; i < callbacks.size(); ++i) 807 for (size_t i = 0; i < callbacks.size(); ++i)
802 callbacks[i].Run(); 808 callbacks[i].Run();
803 809
804 return settings_loaded; 810 return settings_loaded;
805 } 811 }
806 812
807 } // namespace chromeos 813 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/proto/chrome_device_policy.proto ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698