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

Side by Side Diff: chrome/browser/content_settings/storage_info_fetcher.h

Issue 1607483005: Show data usage on Site Details (MDSettings) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698