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

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

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 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 | 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/policy_statistics_collector.h" 5 #include "chrome/browser/policy/policy_statistics_collector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/prefs/pref_registry_simple.h"
14 #include "base/prefs/pref_service.h"
13 #include "base/task_runner.h" 15 #include "base/task_runner.h"
14 #include "chrome/browser/policy/policy_service.h" 16 #include "chrome/browser/policy/policy_service.h"
15 #include "chrome/browser/prefs/pref_registry_simple.h"
16 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "policy/policy_constants.h" 18 #include "policy/policy_constants.h"
19 19
20 namespace policy { 20 namespace policy {
21 21
22 const int PolicyStatisticsCollector::kStatisticsUpdateRate = 22 const int PolicyStatisticsCollector::kStatisticsUpdateRate =
23 24 * 60 * 60 * 1000; // 24 hours. 23 24 * 60 * 60 * 1000; // 24 hours.
24 24
25 PolicyStatisticsCollector::PolicyStatisticsCollector( 25 PolicyStatisticsCollector::PolicyStatisticsCollector(
26 PolicyService* policy_service, 26 PolicyService* policy_service,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 void PolicyStatisticsCollector::ScheduleUpdate(base::TimeDelta delay) { 94 void PolicyStatisticsCollector::ScheduleUpdate(base::TimeDelta delay) {
95 update_callback_.Reset(base::Bind( 95 update_callback_.Reset(base::Bind(
96 &PolicyStatisticsCollector::CollectStatistics, 96 &PolicyStatisticsCollector::CollectStatistics,
97 base::Unretained(this))); 97 base::Unretained(this)));
98 task_runner_->PostDelayedTask(FROM_HERE, update_callback_.callback(), delay); 98 task_runner_->PostDelayedTask(FROM_HERE, update_callback_.callback(), delay);
99 } 99 }
100 100
101 } // namespace policy 101 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_prefs_browsertest.cc ('k') | chrome/browser/policy/url_blacklist_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698