OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/extension_data_deleter.h" | 5 #include "chrome/browser/extensions/extension_data_deleter.h" |
6 | 6 |
7 #include "chrome/browser/in_process_webkit/webkit_context.h" | 7 #include "chrome/browser/in_process_webkit/webkit_context.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/file_system/browser_file_system_context.h" | |
10 #include "chrome/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" |
11 #include "chrome/common/net/url_request_context_getter.h" | 10 #include "chrome/common/net/url_request_context_getter.h" |
12 #include "net/base/cookie_monster.h" | 11 #include "net/base/cookie_monster.h" |
13 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
14 #include "webkit/database/database_util.h" | 13 #include "webkit/database/database_util.h" |
15 #include "webkit/database/database_tracker.h" | 14 #include "webkit/database/database_tracker.h" |
| 15 #include "webkit/fileapi/sandboxed_file_system_context.h" |
16 | 16 |
17 ExtensionDataDeleter::ExtensionDataDeleter(Profile* profile, | 17 ExtensionDataDeleter::ExtensionDataDeleter(Profile* profile, |
18 const GURL& extension_url) { | 18 const GURL& extension_url) { |
19 DCHECK(profile); | 19 DCHECK(profile); |
20 webkit_context_ = profile->GetWebKitContext(); | 20 webkit_context_ = profile->GetWebKitContext(); |
21 database_tracker_ = profile->GetDatabaseTracker(); | 21 database_tracker_ = profile->GetDatabaseTracker(); |
22 extension_request_context_ = profile->GetRequestContextForExtensions(); | 22 extension_request_context_ = profile->GetRequestContextForExtensions(); |
23 file_system_context_ = profile->GetFileSystemContext(); | 23 file_system_context_ = profile->GetFileSystemContext(); |
24 extension_url_ = extension_url; | 24 extension_url_ = extension_url; |
25 origin_id_ = | 25 origin_id_ = |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 void ExtensionDataDeleter::DeleteIndexedDBOnWebkitThread() { | 80 void ExtensionDataDeleter::DeleteIndexedDBOnWebkitThread() { |
81 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); | 81 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); |
82 webkit_context_->indexed_db_context()->DeleteIndexedDBForOrigin(origin_id_); | 82 webkit_context_->indexed_db_context()->DeleteIndexedDBForOrigin(origin_id_); |
83 } | 83 } |
84 | 84 |
85 void ExtensionDataDeleter::DeleteFileSystemOnFileThread() { | 85 void ExtensionDataDeleter::DeleteFileSystemOnFileThread() { |
86 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 86 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
87 file_system_context_->DeleteDataForOriginOnFileThread(extension_url_); | 87 file_system_context_->DeleteDataForOriginOnFileThread(extension_url_); |
88 } | 88 } |
OLD | NEW |