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

Unified Diff: chrome/browser/browsing_data_database_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, 8 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_database_helper.h
diff --git a/chrome/browser/browsing_data_database_helper.h b/chrome/browser/browsing_data_database_helper.h
index 1d5b98dc532ca706d99aa5ed3d633a570cd58e01..3e75058380f7efe96045e70020cff210a1bc1c66 100644
--- a/chrome/browser/browsing_data_database_helper.h
+++ b/chrome/browser/browsing_data_database_helper.h
@@ -29,7 +29,6 @@ class BrowsingDataDatabaseHelper
public:
// Contains detailed information about a web database.
struct DatabaseInfo {
- DatabaseInfo();
DatabaseInfo(const std::string& host,
const std::string& database_name,
const std::string& origin_identifier,
@@ -98,6 +97,17 @@ class BrowsingDataDatabaseHelper
// a parameter during construction.
class CannedBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper {
public:
+ struct PendingDatabaseInfo {
+ PendingDatabaseInfo(const GURL& origin,
+ const std::string& name,
+ const std::string& description);
+ ~PendingDatabaseInfo();
+
+ GURL origin;
+ std::string name;
+ std::string description;
+ };
+
explicit CannedBrowsingDataDatabaseHelper(Profile* profile);
// Return a copy of the database helper. Only one consumer can use the
@@ -120,24 +130,17 @@ class CannedBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper {
// Returns the number of currently stored databases.
size_t GetDatabaseCount() const;
+ // Returns the current list of web databases.
+ const std::list<PendingDatabaseInfo>& pending_database_info() {
+ return pending_database_info_;
+ }
+
// BrowsingDataDatabaseHelper implementation.
virtual void StartFetching(
const base::Callback<void(const std::list<DatabaseInfo>&)>& callback)
OVERRIDE;
private:
- struct PendingDatabaseInfo {
- PendingDatabaseInfo();
- PendingDatabaseInfo(const GURL& origin,
- const std::string& name,
- const std::string& description);
- ~PendingDatabaseInfo();
-
- GURL origin;
- std::string name;
- std::string description;
- };
-
virtual ~CannedBrowsingDataDatabaseHelper();
// Converts the pending database info structs to database info structs.
@@ -146,7 +149,7 @@ class CannedBrowsingDataDatabaseHelper : public BrowsingDataDatabaseHelper {
// Used to protect access to pending_database_info_.
mutable base::Lock lock_;
- // This may mutate on WEBKIT and UI threads.
+ // This may mutate only on the UI thread.
std::list<PendingDatabaseInfo> pending_database_info_;
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698