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

Side by Side Diff: chrome/browser/ui/webui/settings/site_settings_handler.h

Issue 1607483005: Show data usage on Site Details (MDSettings) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback and add owner Created 4 years, 10 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.
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_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
7
8 #include <vector>
9
10 #include "chrome/browser/storage/storage_info_fetcher.h"
11 #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
12
13 class Profile;
14
15 namespace base {
16 class Value;
michaelpg 2016/01/27 18:42:48 ListValue
Finnur 2016/01/28 11:17:49 Done.
17 }
18
19 namespace settings {
20
21 // Chrome "ContentSettings" settings page UI handler.
22 class SiteSettingsHandler
23 : public SettingsPageUIHandler, StorageInfoFetcher::Observer {
24 public:
25 explicit SiteSettingsHandler(Profile* profile);
26 ~SiteSettingsHandler() override;
27
28 // SettingsPageUIHandler:
29 void RegisterMessages() override;
30
31 // StorageInfoFetcher::Observer:
32 void OnGetUsageInfo(const storage::UsageInfoEntries& entries) override;
33
34 private:
35 // Asynchronously fetches the usage for a given origin. Replies back with
36 // OnGetUsageInfo above.
37 void HandleFetchUsageTotal(const base::ListValue* args);
38
39 Profile* profile_;
40
41 // The host for which to fetch usage.
42 std::string usage_host_;
43
44 // The helper object asynchronously fetching storage info.
45 scoped_refptr<StorageInfoFetcher> storage_info_fetcher_;
46
47 DISALLOW_COPY_AND_ASSIGN(SiteSettingsHandler);
48 };
49
50 } // namespace settings
51
52 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698