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

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

Issue 1661533002: Implement deletion of storage per site. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/storage/storage_info_fetcher.h" 10 #include "chrome/browser/storage/storage_info_fetcher.h"
(...skipping 12 matching lines...) Expand all
23 : public SettingsPageUIHandler, StorageInfoFetcher::Observer { 23 : public SettingsPageUIHandler, StorageInfoFetcher::Observer {
24 public: 24 public:
25 explicit SiteSettingsHandler(Profile* profile); 25 explicit SiteSettingsHandler(Profile* profile);
26 ~SiteSettingsHandler() override; 26 ~SiteSettingsHandler() override;
27 27
28 // SettingsPageUIHandler: 28 // SettingsPageUIHandler:
29 void RegisterMessages() override; 29 void RegisterMessages() override;
30 30
31 // StorageInfoFetcher::Observer: 31 // StorageInfoFetcher::Observer:
32 void OnGetUsageInfo(const storage::UsageInfoEntries& entries) override; 32 void OnGetUsageInfo(const storage::UsageInfoEntries& entries) override;
33 void OnUsageInfoCleared(storage::QuotaStatusCode code) override;
33 34
34 private: 35 private:
35 // Asynchronously fetches the usage for a given origin. Replies back with 36 // Asynchronously fetches the usage for a given origin. Replies back with
36 // OnGetUsageInfo above. 37 // OnGetUsageInfo above.
37 void HandleFetchUsageTotal(const base::ListValue* args); 38 void HandleFetchUsageTotal(const base::ListValue* args);
38 39
40 // Deletes the storage being used for a given host.
41 void HandleClearUsage(const base::ListValue* args);
42
39 Profile* profile_; 43 Profile* profile_;
40 44
41 // The host for which to fetch usage. 45 // The host for which to fetch usage.
42 std::string usage_host_; 46 std::string usage_host_;
43 47
48 // The origin for which to clear usage.
49 std::string clearing_origin_;
50
44 // The helper object asynchronously fetching storage info. 51 // The helper object asynchronously fetching storage info.
45 scoped_refptr<StorageInfoFetcher> storage_info_fetcher_; 52 scoped_refptr<StorageInfoFetcher> storage_info_fetcher_;
46 53
47 DISALLOW_COPY_AND_ASSIGN(SiteSettingsHandler); 54 DISALLOW_COPY_AND_ASSIGN(SiteSettingsHandler);
48 }; 55 };
49 56
50 } // namespace settings 57 } // namespace settings
51 58
52 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_ 59 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SITE_SETTINGS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/storage/storage_info_fetcher.cc ('k') | chrome/browser/ui/webui/settings/site_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698