Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DB_SERVICE_H_ | |
| 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DB_SERVICE_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/weak_ptr.h" | |
| 10 #include "base/threading/thread_checker.h" | |
|
jeremyim
2015/07/01 21:31:01
Unused.
Not at Google. Contact bengr
2015/07/01 23:17:38
Done.
| |
| 11 | |
| 12 namespace base { | |
| 13 class FilePath; | |
| 14 } // namespace base | |
| 15 | |
| 16 namespace data_reduction_proxy { | |
| 17 class DataReductionProxyStore; | |
| 18 class DataUsageStore; | |
| 19 class DataUsageBucket; | |
| 20 | |
| 21 typedef base::Callback<void(scoped_ptr<DataUsageBucket>)> | |
| 22 OnLoadDataUsageBucketCallback; | |
| 23 | |
| 24 // Contains and initializes all Data Reduction Proxy objects that have a | |
| 25 // lifetime based on the DB thread. | |
| 26 class DBService { | |
|
jeremyim
2015/07/01 21:31:02
DataReductionProxyDBData?
Not at Google. Contact bengr
2015/07/01 23:17:38
Personally prefer just DBData without the prefix.
jeremyim
2015/07/06 20:08:42
For better our worse, we prefix our filenames + cl
Not at Google. Contact bengr
2015/07/06 21:02:23
sleevi@ had brought our naming convention up in a
| |
| 27 public: | |
| 28 explicit DBService(scoped_ptr<DataReductionProxyStore> store); | |
| 29 virtual ~DBService(); | |
| 30 | |
| 31 void InitializeOnDBThread(); | |
| 32 | |
| 33 void LoadCurrentDataUsageBucket(DataUsageBucket* bucket); | |
| 34 | |
| 35 void StoreCurrentDataUsageBucket(scoped_ptr<DataUsageBucket> current); | |
| 36 | |
| 37 base::WeakPtr<DBService> GetWeakPtr(); | |
| 38 | |
| 39 private: | |
| 40 scoped_ptr<DataReductionProxyStore> store_; | |
| 41 scoped_ptr<DataUsageStore> data_usage_; | |
| 42 base::WeakPtrFactory<DBService> weak_factory_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(DBService); | |
| 45 }; | |
| 46 | |
| 47 } // namespace data_reduction_proxy | |
| 48 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DB_SERVICE_H_ | |
| OLD | NEW |