summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_data_deleter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_data_deleter.cc')
-rw-r--r--chrome/browser/extensions/extension_data_deleter.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_data_deleter.cc b/chrome/browser/extensions/extension_data_deleter.cc
index 14ea9a2..f98ac86 100644
--- a/chrome/browser/extensions/extension_data_deleter.cc
+++ b/chrome/browser/extensions/extension_data_deleter.cc
@@ -5,13 +5,14 @@
#include "chrome/browser/extensions/extension_data_deleter.h"
#include "chrome/browser/in_process_webkit/webkit_context.h"
-#include "chrome/browser/profile.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/net/url_request_context_getter.h"
#include "net/base/cookie_monster.h"
#include "net/base/net_errors.h"
#include "webkit/database/database_util.h"
#include "webkit/database/database_tracker.h"
+#include "webkit/fileapi/sandboxed_file_system_context.h"
ExtensionDataDeleter::ExtensionDataDeleter(Profile* profile,
const GURL& extension_url) {
@@ -19,6 +20,7 @@ ExtensionDataDeleter::ExtensionDataDeleter(Profile* profile,
webkit_context_ = profile->GetWebKitContext();
database_tracker_ = profile->GetDatabaseTracker();
extension_request_context_ = profile->GetRequestContextForExtensions();
+ file_system_context_ = profile->GetFileSystemContext();
extension_url_ = extension_url;
origin_id_ =
webkit_database::DatabaseUtil::GetOriginIdentifier(extension_url_);
@@ -48,6 +50,11 @@ void ExtensionDataDeleter::StartDeleting() {
BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(
this, &ExtensionDataDeleter::DeleteDatabaseOnFileThread));
+
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
+ NewRunnableMethod(
+ this, &ExtensionDataDeleter::DeleteFileSystemOnFileThread));
}
void ExtensionDataDeleter::DeleteCookiesOnIOThread() {
@@ -74,3 +81,8 @@ void ExtensionDataDeleter::DeleteIndexedDBOnWebkitThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
webkit_context_->indexed_db_context()->DeleteIndexedDBForOrigin(origin_id_);
}
+
+void ExtensionDataDeleter::DeleteFileSystemOnFileThread() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ file_system_context_->DeleteDataForOriginOnFileThread(extension_url_);
+}