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

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

Issue 1784333002: Add Device Policy Handler for Bluetooth, and allow disabling the Bluetooth adapter on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bartfab's nits Created 4 years, 8 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 policy.extension_cache_size().extension_cache_size()); 450 policy.extension_cache_size().extension_cache_size());
451 } 451 }
452 452
453 if (policy.has_display_rotation_default() && 453 if (policy.has_display_rotation_default() &&
454 policy.display_rotation_default().has_display_rotation_default()) { 454 policy.display_rotation_default().has_display_rotation_default()) {
455 new_values_cache->SetInteger( 455 new_values_cache->SetInteger(
456 kDisplayRotationDefault, 456 kDisplayRotationDefault,
457 policy.display_rotation_default().display_rotation_default()); 457 policy.display_rotation_default().display_rotation_default());
458 } 458 }
459 459
460 new_values_cache->SetBoolean( 460 if (policy.has_allow_bluetooth() &&
461 kAllowBluetooth, policy.has_allow_bluetooth() && 461 policy.allow_bluetooth().has_allow_bluetooth()) {
462 policy.allow_bluetooth().has_allow_bluetooth() && 462 new_values_cache->SetBoolean(kAllowBluetooth,
463 policy.allow_bluetooth().allow_bluetooth()); 463 policy.allow_bluetooth().allow_bluetooth());
464 } else {
465 new_values_cache->SetBoolean(kAllowBluetooth, true);
466 }
464 467
465 if (policy.has_quirks_download_enabled() && 468 if (policy.has_quirks_download_enabled() &&
466 policy.quirks_download_enabled().has_quirks_download_enabled()) { 469 policy.quirks_download_enabled().has_quirks_download_enabled()) {
467 new_values_cache->SetBoolean( 470 new_values_cache->SetBoolean(
468 kDeviceQuirksDownloadEnabled, 471 kDeviceQuirksDownloadEnabled,
469 policy.quirks_download_enabled().quirks_download_enabled()); 472 policy.quirks_download_enabled().quirks_download_enabled());
470 } 473 }
471 } 474 }
472 475
473 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy, 476 void DecodeLogUploadPolicies(const em::ChromeDeviceSettingsProto& policy,
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 // Notify the observers we are done. 816 // Notify the observers we are done.
814 std::vector<base::Closure> callbacks; 817 std::vector<base::Closure> callbacks;
815 callbacks.swap(callbacks_); 818 callbacks.swap(callbacks_);
816 for (size_t i = 0; i < callbacks.size(); ++i) 819 for (size_t i = 0; i < callbacks.size(); ++i)
817 callbacks[i].Run(); 820 callbacks[i].Run();
818 821
819 return settings_loaded; 822 return settings_loaded;
820 } 823 }
821 824
822 } // namespace chromeos 825 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698