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

Unified Diff: chrome/browser/browsing_data_local_storage_helper.h

Issue 10092013: Display third party cookies and site data counts in the WebsiteSettings UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 7 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/browsing_data_local_storage_helper.h
diff --git a/chrome/browser/browsing_data_local_storage_helper.h b/chrome/browser/browsing_data_local_storage_helper.h
index 6d32b0df79d5343f67b192d371c0d67daa9dd600..3288b146847f810fe8bbecd9982862f5398ad387 100644
--- a/chrome/browser/browsing_data_local_storage_helper.h
+++ b/chrome/browser/browsing_data_local_storage_helper.h
@@ -35,7 +35,6 @@ class BrowsingDataLocalStorageHelper
public:
// Contains detailed information about local storage.
struct LocalStorageInfo {
- LocalStorageInfo();
LocalStorageInfo(
const std::string& protocol,
const std::string& host,
@@ -86,11 +85,14 @@ class BrowsingDataLocalStorageHelper
// This only mutates on the UI thread.
bool is_fetching_;
- // This only mutates in the WEBKIT thread.
+ // Access to |local_storage_info_| is triggered indirectly via the UI thread
+ // and guarded by |is_fetching_|. This means |local_storage_info_| is only
+ // accessed while |is_fetching_| is true. The flag |is_fetching_| is only
+ // accessed on the UI thread.
std::list<LocalStorageInfo> local_storage_info_;
private:
- // Called back with the all the local storage files.
+ // Called back with all the local storage files.
void GetAllStorageFilesCallback(const std::vector<FilePath>& files);
// Get the file info on the file thread.
void FetchLocalStorageInfo(const std::vector<FilePath>& files);
@@ -124,6 +126,9 @@ class CannedBrowsingDataLocalStorageHelper
// Returns the number of local storages currently stored.
size_t GetLocalStorageCount() const;
+ // Returns the set of origins that use local storage.
+ const std::set<GURL>& GetLocalStorageInfo() const;
+
// BrowsingDataLocalStorageHelper implementation.
virtual void StartFetching(
const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback)

Powered by Google App Engine
This is Rietveld 408576698