Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
|
raymes
2016/01/20 02:51:42
Hmm not sure if this is the right place to put thi
Finnur
2016/01/22 15:07:35
It doesn't belong under Web UI because I plan on m
| |
| 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 CHROME_BROWSER_CONTENT_SETTINGS_STORAGE_INFO_FETCHER_H_ | |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_STORAGE_INFO_FETCHER_H_ | |
| 7 | |
| 8 #include "content/public/browser/browser_thread.h" | |
|
michaelpg
2016/01/19 20:47:54
is this used here?
Finnur
2016/01/22 15:07:35
Nope, moved.
| |
| 9 #include "storage/browser/quota/quota_manager.h" | |
| 10 | |
| 11 class StorageInfoFetcher : | |
|
Finnur
2016/01/19 17:08:57
This class is really a distillation of the one tha
michaelpg
2016/01/19 20:47:54
add comment for class
Finnur
2016/01/22 15:07:35
Done.
| |
| 12 public base::RefCountedThreadSafe<StorageInfoFetcher> { | |
|
michaelpg
2016/01/19 20:47:54
include ref_counted.h
Finnur
2016/01/22 15:07:35
Done.
| |
| 13 public: | |
| 14 explicit StorageInfoFetcher(storage::QuotaManager* quota_manager); | |
| 15 | |
| 16 // Asynchronously fetches the StorageInfo. | |
| 17 void Run(); | |
| 18 | |
| 19 protected: | |
| 20 virtual ~StorageInfoFetcher(); | |
| 21 | |
| 22 // The callback for when usage information is ready. | |
| 23 virtual void OnGetUsageInfo(const storage::UsageInfoEntries& entries) = 0; | |
| 24 | |
| 25 private: | |
| 26 friend class base::RefCountedThreadSafe<StorageInfoFetcher>; | |
| 27 | |
| 28 void GetUsageInfo(); | |
| 29 void OnGetUsageInfoInternal(const storage::UsageInfoEntries& entries); | |
| 30 void InvokeCallback(); | |
| 31 | |
| 32 storage::QuotaManager* quota_manager_; | |
| 33 storage::UsageInfoEntries entries_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(StorageInfoFetcher); | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_CONTENT_SETTINGS_STORAGE_INFO_FETCHER_H_ | |
| OLD | NEW |