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

Unified Diff: content/browser/in_process_webkit/indexed_db_quota_client.cc

Issue 7310022: Implement GetOrigins for indexeddb quota (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove url_constants.h include Created 9 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: content/browser/in_process_webkit/indexed_db_quota_client.cc
diff --git a/content/browser/in_process_webkit/indexed_db_quota_client.cc b/content/browser/in_process_webkit/indexed_db_quota_client.cc
index 08e3478fd78f9a23d351b69a1c3a805b3b004652..4c3aaac2312071e613e8a82fe403add1dd012af4 100644
--- a/content/browser/in_process_webkit/indexed_db_quota_client.cc
+++ b/content/browser/in_process_webkit/indexed_db_quota_client.cc
@@ -66,7 +66,15 @@ class IndexedDBQuotaClient::GetOriginsTaskBase : public HelperTask {
virtual bool ShouldAddOrigin(const GURL& origin) = 0;
virtual void RunOnTargetThread() OVERRIDE {
- // TODO(dgrogan): Implement.
+ std::vector<string16> origin_identifiers;
+ indexed_db_context_->GetAllOriginIdentifiers(&origin_identifiers);
+ for (std::vector<string16>::const_iterator iter =
+ origin_identifiers.begin();
+ iter != origin_identifiers.end(); ++iter) {
+ GURL origin = DatabaseUtil::GetOriginFromIdentifier(*iter);
+ if (ShouldAddOrigin(origin))
+ origins_.insert(origin);
+ }
}
std::set<GURL> origins_;

Powered by Google App Engine
This is Rietveld 408576698