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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.cc

Issue 738313003: Fix WeakPtrFactory member ordering in components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat istics_prefs.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat istics_prefs.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/prefs/scoped_user_pref_update.h" 12 #include "base/prefs/scoped_user_pref_update.h"
13 #include "base/sequenced_task_runner.h" 13 #include "base/sequenced_task_runner.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 17
18 namespace data_reduction_proxy { 18 namespace data_reduction_proxy {
19 19
20 DataReductionProxyStatisticsPrefs::DataReductionProxyStatisticsPrefs( 20 DataReductionProxyStatisticsPrefs::DataReductionProxyStatisticsPrefs(
21 PrefService* prefs, 21 PrefService* prefs,
22 scoped_refptr<base::SequencedTaskRunner> task_runner, 22 scoped_refptr<base::SequencedTaskRunner> task_runner,
23 const base::TimeDelta& delay) 23 const base::TimeDelta& delay)
24 : pref_service_(prefs), 24 : pref_service_(prefs),
25 task_runner_(task_runner), 25 task_runner_(task_runner),
26 delay_(delay), 26 delay_(delay),
27 delayed_task_posted_(false), 27 delayed_task_posted_(false),
28 weak_factory_(this), 28 pref_change_registrar_(new PrefChangeRegistrar()),
29 pref_change_registrar_(new PrefChangeRegistrar()) { 29 weak_factory_(this) {
30 DCHECK(prefs); 30 DCHECK(prefs);
31 DCHECK_GE(delay.InMilliseconds(), 0); 31 DCHECK_GE(delay.InMilliseconds(), 0);
32 Init(); 32 Init();
33 } 33 }
34 34
35 DataReductionProxyStatisticsPrefs::~DataReductionProxyStatisticsPrefs() { 35 DataReductionProxyStatisticsPrefs::~DataReductionProxyStatisticsPrefs() {
36 // This object is created on UI thread, but destroyed on IO thread. So no 36 // This object is created on UI thread, but destroyed on IO thread. So no
37 // DCHECK on thread_checker_ here. 37 // DCHECK on thread_checker_ here.
38 } 38 }
39 39
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return 0; 180 return 0;
181 } 181 }
182 182
183 int64 value = 0; 183 int64 value = 0;
184 bool rv = base::StringToInt64(string_value, &value); 184 bool rv = base::StringToInt64(string_value, &value);
185 DCHECK(rv); 185 DCHECK(rv);
186 return value; 186 return value;
187 } 187 }
188 188
189 } // namespace data_reduction_proxy 189 } // namespace data_reduction_proxy
OLDNEW
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698