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

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

Issue 2736903004: Add sound volume to device attribute reporting (Closed)
Patch Set: Fixed tests (initialize CrasAudioHandler), added sound volume test Created 3 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/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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, 484 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
485 base::MakeUnique<base::Value>(container.report_session_status()), 485 base::MakeUnique<base::Value>(container.report_session_status()),
486 nullptr); 486 nullptr);
487 } 487 }
488 if (container.has_device_status_frequency()) { 488 if (container.has_device_status_frequency()) {
489 policies->Set(key::kReportUploadFrequency, POLICY_LEVEL_MANDATORY, 489 policies->Set(key::kReportUploadFrequency, POLICY_LEVEL_MANDATORY,
490 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, 490 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
491 DecodeIntegerValue(container.device_status_frequency()), 491 DecodeIntegerValue(container.device_status_frequency()),
492 nullptr); 492 nullptr);
493 } 493 }
494 if (container.has_report_sound_volume()) {
495 policies->Set(
496 key::kReportSoundVolume, POLICY_LEVEL_MANDATORY,
Andrew T Wilson (Slow) 2017/03/09 15:56:34 I wouldn't build a separate control for this - jus
497 POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD,
498 base::MakeUnique<base::Value>(container.report_sound_volume()),
499 nullptr);
500 }
494 } 501 }
495 502
496 if (policy.has_device_heartbeat_settings()) { 503 if (policy.has_device_heartbeat_settings()) {
497 const em::DeviceHeartbeatSettingsProto& container( 504 const em::DeviceHeartbeatSettingsProto& container(
498 policy.device_heartbeat_settings()); 505 policy.device_heartbeat_settings());
499 if (container.has_heartbeat_enabled()) { 506 if (container.has_heartbeat_enabled()) {
500 policies->Set( 507 policies->Set(
501 key::kHeartbeatEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, 508 key::kHeartbeatEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
502 POLICY_SOURCE_CLOUD, 509 POLICY_SOURCE_CLOUD,
503 base::MakeUnique<base::Value>(container.heartbeat_enabled()), 510 base::MakeUnique<base::Value>(container.heartbeat_enabled()),
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 // Decode the various groups of policies. 883 // Decode the various groups of policies.
877 DecodeLoginPolicies(policy, policies); 884 DecodeLoginPolicies(policy, policies);
878 DecodeNetworkPolicies(policy, policies); 885 DecodeNetworkPolicies(policy, policies);
879 DecodeReportingPolicies(policy, policies); 886 DecodeReportingPolicies(policy, policies);
880 DecodeAutoUpdatePolicies(policy, policies); 887 DecodeAutoUpdatePolicies(policy, policies);
881 DecodeAccessibilityPolicies(policy, policies); 888 DecodeAccessibilityPolicies(policy, policies);
882 DecodeGenericPolicies(policy, policies); 889 DecodeGenericPolicies(policy, policies);
883 } 890 }
884 891
885 } // namespace policy 892 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698