Chromium Code Reviews| Index: components/metrics/data_use_tracker.h |
| diff --git a/components/metrics/data_use_tracker.h b/components/metrics/data_use_tracker.h |
| index b6441ec79806cb7e612c7d8a648c10313e25db5a..46bf3d2f017b612e15c961ed95410599b807d4c0 100644 |
| --- a/components/metrics/data_use_tracker.h |
| +++ b/components/metrics/data_use_tracker.h |
| @@ -10,9 +10,6 @@ |
| #include "base/callback.h" |
| #include "base/gtest_prod_util.h" |
| #include "base/macros.h" |
| -#include "base/memory/ref_counted.h" |
| -#include "base/memory/weak_ptr.h" |
| -#include "base/sequenced_task_runner.h" |
| #include "base/threading/thread_checker.h" |
| #include "base/time/time.h" |
| #include "components/prefs/pref_registry_simple.h" |
| @@ -38,10 +35,9 @@ class DataUseTracker { |
| // Registers data use prefs using provided |registry|. |
| static void RegisterPrefs(PrefRegistrySimple* registry); |
| - // Returns a callback to data use pref updating function. Should be called on |
| - // UI thread. |
| - UpdateUsagePrefCallbackType GetDataUseForwardingCallback( |
| - scoped_refptr<base::SequencedTaskRunner> ui_task_runner); |
| + // Updates data usage prefs according to what the PrefService expects. |
|
Alexei Svitkine (slow)
2016/11/30 19:16:27
"according to what the PrefService expects" doesn'
robliao
2016/11/30 20:33:13
Done.
|
| + void UpdateMetricsUsagePrefs( |
| + const std::string& service_name, int message_size, bool is_cellular); |
| // Returns whether a log with provided |log_bytes| can be uploaded according |
| // to data use ratio and UMA quota provided by variations. |
| @@ -53,11 +49,6 @@ class DataUseTracker { |
| FRIEND_TEST_ALL_PREFIXES(DataUseTrackerTest, CheckComputeTotalDataUse); |
| FRIEND_TEST_ALL_PREFIXES(DataUseTrackerTest, CheckCanUploadUMALog); |
| - // Updates data usage prefs on UI thread according to what Prefservice |
| - // expects. |
| - void UpdateMetricsUsagePrefsOnUIThread(const std::string& service_name, |
| - int message_size, |
| - bool is_cellular); |
|
Alexei Svitkine (slow)
2016/11/30 19:16:27
Nit: Remove extra line.
robliao
2016/11/30 20:33:13
Done.
|
| // Updates provided |pref_name| for a current date with the given message |
| // size. |
| @@ -90,8 +81,6 @@ class DataUseTracker { |
| base::ThreadChecker thread_checker_; |
| - base::WeakPtrFactory<DataUseTracker> weak_ptr_factory_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(DataUseTracker); |
| }; |