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

Unified Diff: chrome/browser/ui/webui/options/website_settings_handler.h

Issue 408493003: Show local storage usage on the Website Settings options page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/website_settings_handler.h
diff --git a/chrome/browser/ui/webui/options/website_settings_handler.h b/chrome/browser/ui/webui/options/website_settings_handler.h
index bce6bf24bd4b6e75d1f4dd782cf36eac569490b6..6ea8ede7c18e5f686f2fa919101570ef163fe19b 100644
--- a/chrome/browser/ui/webui/options/website_settings_handler.h
+++ b/chrome/browser/ui/webui/options/website_settings_handler.h
@@ -9,7 +9,9 @@
#include "base/basictypes.h"
#include "base/macros.h"
+#include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
+#include "chrome/browser/content_settings/local_shared_objects_container.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -35,11 +37,25 @@ class WebsiteSettingsHandler : public OptionsPageUIHandler {
// |args| is the filter string.
void HandleUpdateSearchResults(const base::ListValue* args);
+ // Update the page with all origins that are using local storage.
+ void HandleUpdateLocalStorage(const base::ListValue* args);
+
+ // Callback method to be invoked when fetching the data is complete.
+ void OnLocalStorageFetch(
Bernhard Bauer 2014/07/21 11:29:30 Nit: OnLocalStoragedFetched?
Daniel Nishi 2014/07/21 17:53:37 Done.
+ const std::string& filter,
+ const std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>&
+ storage);
+
// Get all origins with Content Settings for the last given content setting,
// filter them by |filter|, and update the page.
void UpdateOrigins(const std::string& filter);
- ContentSettingsType last_setting_;
+ // Get all origins with local storage usage, filter them by |filter|, and
+ // update the page.
+ void UpdateLocalStorage(const std::string& filter);
+
+ std::string last_setting_;
+ scoped_refptr<BrowsingDataLocalStorageHelper> local_storage_;
DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsHandler);
};

Powered by Google App Engine
This is Rietveld 408576698