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

Side by Side Diff: chrome/browser/policy/device_status_collector.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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/policy/device_status_collector.h" 5 #include "chrome/browser/policy/device_status_collector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 DeviceStatusCollector::~DeviceStatusCollector() { 145 DeviceStatusCollector::~DeviceStatusCollector() {
146 cros_settings_->RemoveSettingsObserver(chromeos::kReportDeviceVersionInfo, 146 cros_settings_->RemoveSettingsObserver(chromeos::kReportDeviceVersionInfo,
147 this); 147 this);
148 cros_settings_->RemoveSettingsObserver(chromeos::kReportDeviceActivityTimes, 148 cros_settings_->RemoveSettingsObserver(chromeos::kReportDeviceActivityTimes,
149 this); 149 this);
150 cros_settings_->RemoveSettingsObserver(chromeos::kReportDeviceBootMode, this); 150 cros_settings_->RemoveSettingsObserver(chromeos::kReportDeviceBootMode, this);
151 cros_settings_->RemoveSettingsObserver(chromeos::kReportDeviceLocation, this); 151 cros_settings_->RemoveSettingsObserver(chromeos::kReportDeviceLocation, this);
152 } 152 }
153 153
154 // static 154 // static
155 void DeviceStatusCollector::RegisterPrefs(PrefService* local_state) { 155 void DeviceStatusCollector::RegisterPrefs(PrefServiceSimple* local_state) {
156 local_state->RegisterDictionaryPref(prefs::kDeviceActivityTimes, 156 local_state->RegisterDictionaryPref(prefs::kDeviceActivityTimes,
157 new base::DictionaryValue); 157 new base::DictionaryValue);
158 local_state->RegisterDictionaryPref(prefs::kDeviceLocation, 158 local_state->RegisterDictionaryPref(prefs::kDeviceLocation,
159 new base::DictionaryValue); 159 new base::DictionaryValue);
160 } 160 }
161 161
162 void DeviceStatusCollector::CheckIdleState() { 162 void DeviceStatusCollector::CheckIdleState() {
163 CalculateIdleState(kIdleStateThresholdSeconds, 163 CalculateIdleState(kIdleStateThresholdSeconds,
164 base::Bind(&DeviceStatusCollector::IdleStateCallback, 164 base::Bind(&DeviceStatusCollector::IdleStateCallback,
165 base::Unretained(this))); 165 base::Unretained(this)));
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 location.SetDouble(kSpeed, position.speed); 460 location.SetDouble(kSpeed, position.speed);
461 location.SetString(kTimestamp, 461 location.SetString(kTimestamp,
462 base::Int64ToString(position.timestamp.ToInternalValue())); 462 base::Int64ToString(position.timestamp.ToInternalValue()));
463 local_state_->Set(prefs::kDeviceLocation, location); 463 local_state_->Set(prefs::kDeviceLocation, location);
464 } 464 }
465 465
466 ScheduleGeolocationUpdateRequest(); 466 ScheduleGeolocationUpdateRequest();
467 } 467 }
468 468
469 } // namespace policy 469 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_status_collector.h ('k') | chrome/browser/policy/device_status_collector_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698