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

Unified Diff: chrome/browser/extensions/data_deleter.cc

Issue 10919307: Move IndexedDBContext into the StoragePartition and ensure isolation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove useless include 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 | « chrome/browser/extensions/data_deleter.h ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/data_deleter.cc
diff --git a/chrome/browser/extensions/data_deleter.cc b/chrome/browser/extensions/data_deleter.cc
index 38c3775af0e74ab541789acbe3da7806386ce9f7..9ce58a885807ce9beb624ed63ae4598af2817b79 100644
--- a/chrome/browser/extensions/data_deleter.cc
+++ b/chrome/browser/extensions/data_deleter.cc
@@ -54,8 +54,7 @@ void DataDeleter::StartDeleting(Profile* profile,
BrowserThread::WEBKIT_DEPRECATED, FROM_HERE,
base::Bind(
&DataDeleter::DeleteIndexedDBOnWebkitThread,
- deleter,
- make_scoped_refptr(BrowserContext::GetIndexedDBContext(profile))));
+ deleter));
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
@@ -88,6 +87,8 @@ DataDeleter::DataDeleter(
GetDatabaseTracker();
// Pick the right request context depending on whether it's an extension,
// isolated app, or regular app.
+ content::StoragePartition* storage_partition =
+ BrowserContext::GetDefaultStoragePartition(profile);
if (storage_origin.SchemeIs(chrome::kExtensionScheme)) {
extension_request_context_ = profile->GetRequestContextForExtensions();
} else if (is_storage_isolated) {
@@ -99,7 +100,10 @@ DataDeleter::DataDeleter(
} else {
extension_request_context_ = profile->GetRequestContext();
}
+
file_system_context_ = BrowserContext::GetFileSystemContext(profile);
+ indexed_db_context_ = storage_partition->GetIndexedDBContext();
+
storage_origin_ = storage_origin;
origin_id_ =
webkit_database::DatabaseUtil::GetOriginIdentifier(storage_origin_);
@@ -125,10 +129,9 @@ void DataDeleter::DeleteDatabaseOnFileThread() {
DCHECK(rv == net::OK || rv == net::ERR_IO_PENDING);
}
-void DataDeleter::DeleteIndexedDBOnWebkitThread(
- scoped_refptr<IndexedDBContext> indexed_db_context) {
+void DataDeleter::DeleteIndexedDBOnWebkitThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
- indexed_db_context->DeleteForOrigin(storage_origin_);
+ indexed_db_context_->DeleteForOrigin(storage_origin_);
}
void DataDeleter::DeleteFileSystemOnFileThread() {
« no previous file with comments | « chrome/browser/extensions/data_deleter.h ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698