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

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

Issue 1775023002: Enterprise policy to prevent queries to the Quirks Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge 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 kDeviceQuirksDownloadEnabled,
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 if (policy.has_quirks_download_enabled()) {
459 if (policy.quirks_download_enabled().has_quirks_download_enabled()) {
460 new_values_cache->SetBoolean(
461 kDeviceQuirksDownloadEnabled,
462 policy.quirks_download_enabled().quirks_download_enabled());
463 }
464 }
456 } 465 }
457 466
458 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy, 467 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy,
459 PrefValueMap* new_values_cache) { 468 PrefValueMap* new_values_cache) {
460 if (!policy.has_device_log_upload_settings()) 469 if (!policy.has_device_log_upload_settings())
461 return; 470 return;
462 471
463 const em::DeviceLogUploadSettingsProto& log_upload_policy = 472 const em::DeviceLogUploadSettingsProto& log_upload_policy =
464 policy.device_log_upload_settings(); 473 policy.device_log_upload_settings();
465 if (log_upload_policy.has_system_log_upload_enabled()) { 474 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. 807 // Notify the observers we are done.
799 std::vector<base::Closure> callbacks; 808 std::vector<base::Closure> callbacks;
800 callbacks.swap(callbacks_); 809 callbacks.swap(callbacks_);
801 for (size_t i = 0; i < callbacks.size(); ++i) 810 for (size_t i = 0; i < callbacks.size(); ++i)
802 callbacks[i].Run(); 811 callbacks[i].Run();
803 812
804 return settings_loaded; 813 return settings_loaded;
805 } 814 }
806 815
807 } // namespace chromeos 816 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698