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

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

Issue 17068004: Revert 207755 "Add device policies to control accessibility sett..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 409
410 if (container.has_reboot_after_update()) { 410 if (container.has_reboot_after_update()) {
411 policies->Set(key::kRebootAfterUpdate, 411 policies->Set(key::kRebootAfterUpdate,
412 POLICY_LEVEL_MANDATORY, 412 POLICY_LEVEL_MANDATORY,
413 POLICY_SCOPE_MACHINE, 413 POLICY_SCOPE_MACHINE,
414 Value::CreateBooleanValue(container.reboot_after_update())); 414 Value::CreateBooleanValue(container.reboot_after_update()));
415 } 415 }
416 } 416 }
417 } 417 }
418 418
419 void DecodeAccessibilityPolicies(const em::ChromeDeviceSettingsProto& policy,
420 PolicyMap* policies) {
421 if (policy.has_accessibility_settings()) {
422 const em::AccessibilitySettingsProto&
423 container(policy.accessibility_settings());
424
425 if (container.has_login_screen_default_large_cursor_enabled()) {
426 policies->Set(
427 key::kDeviceLoginScreenDefaultLargeCursorEnabled,
428 POLICY_LEVEL_MANDATORY,
429 POLICY_SCOPE_MACHINE,
430 Value::CreateBooleanValue(
431 container.login_screen_default_large_cursor_enabled()));
432 }
433
434 if (container.has_login_screen_default_spoken_feedback_enabled()) {
435 policies->Set(
436 key::kDeviceLoginScreenDefaultSpokenFeedbackEnabled,
437 POLICY_LEVEL_MANDATORY,
438 POLICY_SCOPE_MACHINE,
439 Value::CreateBooleanValue(
440 container.login_screen_default_spoken_feedback_enabled()));
441 }
442
443 if (container.has_login_screen_default_high_contrast_enabled()) {
444 policies->Set(
445 key::kDeviceLoginScreenDefaultHighContrastEnabled,
446 POLICY_LEVEL_MANDATORY,
447 POLICY_SCOPE_MACHINE,
448 Value::CreateBooleanValue(
449 container.login_screen_default_high_contrast_enabled()));
450 }
451
452 if (container.has_login_screen_default_screen_magnifier_type()) {
453 policies->Set(
454 key::kDeviceLoginScreenDefaultScreenMagnifierType,
455 POLICY_LEVEL_MANDATORY,
456 POLICY_SCOPE_MACHINE,
457 DecodeIntegerValue(
458 container.login_screen_default_screen_magnifier_type()));
459 }
460 }
461 }
462
463 void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy, 419 void DecodeGenericPolicies(const em::ChromeDeviceSettingsProto& policy,
464 PolicyMap* policies) { 420 PolicyMap* policies) {
465 if (policy.has_device_policy_refresh_rate()) { 421 if (policy.has_device_policy_refresh_rate()) {
466 const em::DevicePolicyRefreshRateProto& container( 422 const em::DevicePolicyRefreshRateProto& container(
467 policy.device_policy_refresh_rate()); 423 policy.device_policy_refresh_rate());
468 if (container.has_device_policy_refresh_rate()) { 424 if (container.has_device_policy_refresh_rate()) {
469 policies->Set(key::kDevicePolicyRefreshRate, 425 policies->Set(key::kDevicePolicyRefreshRate,
470 POLICY_LEVEL_MANDATORY, 426 POLICY_LEVEL_MANDATORY,
471 POLICY_SCOPE_MACHINE, 427 POLICY_SCOPE_MACHINE,
472 DecodeIntegerValue(container.device_policy_refresh_rate())); 428 DecodeIntegerValue(container.device_policy_refresh_rate()));
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 526
571 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, 527 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy,
572 PolicyMap* policies, 528 PolicyMap* policies,
573 EnterpriseInstallAttributes* install_attributes) { 529 EnterpriseInstallAttributes* install_attributes) {
574 // Decode the various groups of policies. 530 // Decode the various groups of policies.
575 DecodeLoginPolicies(policy, policies); 531 DecodeLoginPolicies(policy, policies);
576 DecodeKioskPolicies(policy, policies, install_attributes); 532 DecodeKioskPolicies(policy, policies, install_attributes);
577 DecodeNetworkPolicies(policy, policies, install_attributes); 533 DecodeNetworkPolicies(policy, policies, install_attributes);
578 DecodeReportingPolicies(policy, policies); 534 DecodeReportingPolicies(policy, policies);
579 DecodeAutoUpdatePolicies(policy, policies); 535 DecodeAutoUpdatePolicies(policy, policies);
580 DecodeAccessibilityPolicies(policy, policies);
581 DecodeGenericPolicies(policy, policies); 536 DecodeGenericPolicies(policy, policies);
582 } 537 }
583 538
584 } // namespace policy 539 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698