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

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

Issue 907323002: Implemented DeviceStatusCollector::GetDeviceSessionStatus() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 kDeviceAttestationEnabled, 57 kDeviceAttestationEnabled,
58 kDeviceOwner, 58 kDeviceOwner,
59 kPolicyMissingMitigationMode, 59 kPolicyMissingMitigationMode,
60 kReleaseChannel, 60 kReleaseChannel,
61 kReleaseChannelDelegated, 61 kReleaseChannelDelegated,
62 kReportDeviceActivityTimes, 62 kReportDeviceActivityTimes,
63 kReportDeviceBootMode, 63 kReportDeviceBootMode,
64 kReportDeviceLocation, 64 kReportDeviceLocation,
65 kReportDeviceNetworkInterfaces, 65 kReportDeviceNetworkInterfaces,
66 kReportDeviceUsers, 66 kReportDeviceUsers,
67 kReportDeviceHardwareStatus, 67 kReportDeviceHardwareStatus,
68 kReportDeviceSessionStatus,
68 kReportDeviceVersionInfo, 69 kReportDeviceVersionInfo,
69 kServiceAccountIdentity, 70 kServiceAccountIdentity,
70 kSignedDataRoamingEnabled, 71 kSignedDataRoamingEnabled,
71 kStartUpFlags, 72 kStartUpFlags,
72 kStatsReportingPref, 73 kStatsReportingPref,
73 kSystemTimezonePolicy, 74 kSystemTimezonePolicy,
74 kSystemUse24HourClock, 75 kSystemUse24HourClock,
75 kUpdateDisabled, 76 kUpdateDisabled,
76 kVariationsRestrictParameter, 77 kVariationsRestrictParameter,
77 kDeviceDisabled, 78 kDeviceDisabled,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 if (reporting_policy.has_report_users()) { 305 if (reporting_policy.has_report_users()) {
305 new_values_cache->SetBoolean( 306 new_values_cache->SetBoolean(
306 kReportDeviceUsers, 307 kReportDeviceUsers,
307 reporting_policy.report_users()); 308 reporting_policy.report_users());
308 } 309 }
309 if (reporting_policy.has_report_hardware_status()) { 310 if (reporting_policy.has_report_hardware_status()) {
310 new_values_cache->SetBoolean( 311 new_values_cache->SetBoolean(
311 kReportDeviceHardwareStatus, 312 kReportDeviceHardwareStatus,
312 reporting_policy.report_hardware_status()); 313 reporting_policy.report_hardware_status());
313 } 314 }
315 if (reporting_policy.has_report_session_status()) {
bartfab (slow) 2015/02/11 17:28:43 You need to add this new policy policy_templates.j
Andrew T Wilson (Slow) 2015/02/12 15:15:39 This is part of the other CL which I will land bef
316 new_values_cache->SetBoolean(
317 kReportDeviceSessionStatus,
318 reporting_policy.report_session_status());
319 }
314 } 320 }
315 } 321 }
316 322
317 void DecodeGenericPolicies( 323 void DecodeGenericPolicies(
318 const em::ChromeDeviceSettingsProto& policy, 324 const em::ChromeDeviceSettingsProto& policy,
319 PrefValueMap* new_values_cache) { 325 PrefValueMap* new_values_cache) {
320 if (policy.has_metrics_enabled()) { 326 if (policy.has_metrics_enabled()) {
321 new_values_cache->SetBoolean(kStatsReportingPref, 327 new_values_cache->SetBoolean(kStatsReportingPref,
322 policy.metrics_enabled().metrics_enabled()); 328 policy.metrics_enabled().metrics_enabled());
323 } else { 329 } else {
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 void DeviceSettingsProvider::AttemptMigration() { 767 void DeviceSettingsProvider::AttemptMigration() {
762 if (device_settings_service_->HasPrivateOwnerKey()) { 768 if (device_settings_service_->HasPrivateOwnerKey()) {
763 PrefValueMap::const_iterator i; 769 PrefValueMap::const_iterator i;
764 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) 770 for (i = migration_values_.begin(); i != migration_values_.end(); ++i)
765 DoSet(i->first, *i->second); 771 DoSet(i->first, *i->second);
766 migration_values_.Clear(); 772 migration_values_.Clear();
767 } 773 }
768 } 774 }
769 775
770 } // namespace chromeos 776 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698