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

Unified Diff: content/browser/in_process_webkit/indexed_db_context_impl.h

Issue 10695158: IndexedDB: Close open databases when user requests browsing data deletion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove const from iterator (not sure how this slipped through) Created 8 years, 3 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
« no previous file with comments | « no previous file | content/browser/in_process_webkit/indexed_db_context_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/in_process_webkit/indexed_db_context_impl.h
diff --git a/content/browser/in_process_webkit/indexed_db_context_impl.h b/content/browser/in_process_webkit/indexed_db_context_impl.h
index bbfe4d6aff0c6bae097cf7fd73d8de6b6d5b8afd..41a7c0f29ae9afcfaee89a4aa740a3f4c392f3c1 100644
--- a/content/browser/in_process_webkit/indexed_db_context_impl.h
+++ b/content/browser/in_process_webkit/indexed_db_context_impl.h
@@ -20,6 +20,7 @@ class GURL;
class FilePath;
namespace WebKit {
+class WebIDBDatabase;
class WebIDBFactory;
}
@@ -63,8 +64,8 @@ class CONTENT_EXPORT IndexedDBContextImpl
const string16& origin_id) const OVERRIDE;
// Methods called by IndexedDBDispatcherHost for quota support.
- void ConnectionOpened(const GURL& origin_url);
- void ConnectionClosed(const GURL& origin_url);
+ void ConnectionOpened(const GURL& origin_url, WebKit::WebIDBDatabase*);
+ void ConnectionClosed(const GURL& origin_url, WebKit::WebIDBDatabase*);
void TransactionComplete(const GURL& origin_url);
bool WouldBeOverQuota(const GURL& origin_url, int64 additional_bytes);
bool IsOverQuota(const GURL& origin_url);
@@ -85,6 +86,7 @@ class CONTENT_EXPORT IndexedDBContextImpl
FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ClearLocalState);
FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ClearSessionOnlyDatabases);
FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, SetForceKeepSessionState);
+ FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ForceCloseOpenDatabasesOnDelete);
friend class IndexedDBQuotaClientTest;
typedef std::map<GURL, int64> OriginToSizeMap;
@@ -123,7 +125,8 @@ class CONTENT_EXPORT IndexedDBContextImpl
scoped_ptr<std::set<GURL> > origin_set_;
OriginToSizeMap origin_size_map_;
OriginToSizeMap space_available_map_;
- std::map<GURL, unsigned int> connection_count_;
+ typedef std::set<WebKit::WebIDBDatabase*> ConnectionSet;
+ std::map<GURL, ConnectionSet> connections_;
DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl);
};
« no previous file with comments | « no previous file | content/browser/in_process_webkit/indexed_db_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698