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

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

Issue 7310022: Implement GetOrigins for indexeddb quota (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't filter extension origins 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_context.cc
diff --git a/content/browser/in_process_webkit/indexed_db_context.cc b/content/browser/in_process_webkit/indexed_db_context.cc
index aacc5b9d3c9ab00bfe52405d2d4529eff1df6780..3982e3d8f1701bc14636f5c0edf3d5a70418524e 100644
--- a/content/browser/in_process_webkit/indexed_db_context.cc
+++ b/content/browser/in_process_webkit/indexed_db_context.cc
@@ -12,6 +12,7 @@
#include "content/browser/browser_thread.h"
#include "content/browser/in_process_webkit/indexed_db_quota_client.h"
#include "content/browser/in_process_webkit/webkit_context.h"
+#include "content/common/url_constants.h"
michaeln 2011/07/08 00:15:59 is this include still needed?
dgrogan 2011/07/08 00:50:06 Nope. Removed.
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h"
@@ -118,3 +119,20 @@ bool IndexedDBContext::IsUnlimitedStorageGranted(
const GURL& origin) const {
return special_storage_policy_->IsStorageUnlimited(origin);
}
+
+// TODO(dgrogan): Merge this code with the similar loop in
+// BrowsingDataIndexedDBHelperImpl::FetchIndexedDBInfoInWebKitThread.
+void IndexedDBContext::GetAllOriginIdentifiers(
+ std::vector<string16>* origin_ids) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
+ file_util::FileEnumerator file_enumerator(data_path_,
+ false, file_util::FileEnumerator::DIRECTORIES);
+ for (FilePath file_path = file_enumerator.Next(); !file_path.empty();
+ file_path = file_enumerator.Next()) {
+ if (file_path.Extension() == IndexedDBContext::kIndexedDBExtension) {
+ WebKit::WebString origin_id_webstring =
+ webkit_glue::FilePathToWebString(file_path.BaseName());
+ origin_ids->push_back(origin_id_webstring);
+ }
+ }
+}
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_context.h ('k') | content/browser/in_process_webkit/indexed_db_quota_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698