OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/sequenced_task_runner_helpers.h" | 10 #include "base/sequenced_task_runner_helpers.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 | 14 |
| 15 namespace appcache { |
| 16 class AppCacheService; |
| 17 } |
| 18 |
15 namespace content { | 19 namespace content { |
16 class DOMStorageContext; | 20 class DOMStorageContext; |
17 class IndexedDBContext; | 21 class IndexedDBContext; |
18 class ResourceContext; | |
19 } | 22 } |
20 | 23 |
21 namespace fileapi { | 24 namespace fileapi { |
22 class FileSystemContext; | 25 class FileSystemContext; |
23 } | 26 } |
24 | 27 |
25 namespace net { | 28 namespace net { |
26 class URLRequestContextGetter; | 29 class URLRequestContextGetter; |
27 } | 30 } |
28 | 31 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // webkit thread. | 76 // webkit thread. |
74 void DeleteIndexedDBOnWebkitThread( | 77 void DeleteIndexedDBOnWebkitThread( |
75 scoped_refptr<content::IndexedDBContext> indexed_db_context); | 78 scoped_refptr<content::IndexedDBContext> indexed_db_context); |
76 | 79 |
77 // Deletes filesystem files for the extension. May only be called on the | 80 // Deletes filesystem files for the extension. May only be called on the |
78 // file thread. | 81 // file thread. |
79 void DeleteFileSystemOnFileThread(); | 82 void DeleteFileSystemOnFileThread(); |
80 | 83 |
81 // Deletes appcache files for the extension. May only be called on the IO | 84 // Deletes appcache files for the extension. May only be called on the IO |
82 // thread. | 85 // thread. |
83 void DeleteAppcachesOnIOThread(content::ResourceContext* resource_context); | 86 void DeleteAppcachesOnIOThread(appcache::AppCacheService* appcache_service); |
84 | 87 |
85 // The ID of the extension being deleted. | 88 // The ID of the extension being deleted. |
86 const std::string extension_id_; | 89 const std::string extension_id_; |
87 | 90 |
88 // The database context for deleting the database. | 91 // The database context for deleting the database. |
89 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 92 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
90 | 93 |
91 // Provides access to the request context. | 94 // Provides access to the request context. |
92 scoped_refptr<net::URLRequestContextGetter> extension_request_context_; | 95 scoped_refptr<net::URLRequestContextGetter> extension_request_context_; |
93 | 96 |
94 // The origin of the extension/app for which we're going to clear data. | 97 // The origin of the extension/app for which we're going to clear data. |
95 GURL storage_origin_; | 98 GURL storage_origin_; |
96 | 99 |
97 // The security origin identifier for which we're deleting stuff. | 100 // The security origin identifier for which we're deleting stuff. |
98 string16 origin_id_; | 101 string16 origin_id_; |
99 | 102 |
100 scoped_refptr<fileapi::FileSystemContext> file_system_context_; | 103 scoped_refptr<fileapi::FileSystemContext> file_system_context_; |
101 | 104 |
102 // If non-empty, the extension we're deleting is an isolated app, and this | 105 // If non-empty, the extension we're deleting is an isolated app, and this |
103 // is its directory which we should delete. | 106 // is its directory which we should delete. |
104 FilePath isolated_app_path_; | 107 FilePath isolated_app_path_; |
105 | 108 |
106 DISALLOW_COPY_AND_ASSIGN(DataDeleter); | 109 DISALLOW_COPY_AND_ASSIGN(DataDeleter); |
107 }; | 110 }; |
108 | 111 |
109 } // namespace extensions | 112 } // namespace extensions |
110 | 113 |
111 #endif // CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ | 114 #endif // CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ |
OLD | NEW |