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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 public: | 26 public: |
27 ExtensionDataDeleter(Profile* profile, const GURL& extension_url); | 27 ExtensionDataDeleter(Profile* profile, const GURL& extension_url); |
28 | 28 |
29 // Start removing data. The extension should not be running when this is | 29 // Start removing data. The extension should not be running when this is |
30 // called. Cookies are deleted on the current thread, local storage and | 30 // called. Cookies are deleted on the current thread, local storage and |
31 // databases are deleted asynchronously on the webkit and file threads, | 31 // databases are deleted asynchronously on the webkit and file threads, |
32 // respectively. This function must be called from the UI thread. | 32 // respectively. This function must be called from the UI thread. |
33 void StartDeleting(); | 33 void StartDeleting(); |
34 | 34 |
35 private: | 35 private: |
| 36 // Deletes the cookies for the extension. May only be called on the io |
| 37 // thread. |
| 38 void DeleteCookiesOnIOThread(); |
| 39 |
36 // Deletes the database for the extension. May only be called on the file | 40 // Deletes the database for the extension. May only be called on the file |
37 // thread. | 41 // thread. |
38 void DeleteDatabaseOnFileThread(); | 42 void DeleteDatabaseOnFileThread(); |
39 | 43 |
40 // Deletes local storage for the extension. May only be called on the webkit | 44 // Deletes local storage for the extension. May only be called on the webkit |
41 // thread. | 45 // thread. |
42 void DeleteLocalStorageOnWebkitThread(); | 46 void DeleteLocalStorageOnWebkitThread(); |
43 | 47 |
44 // The database context for deleting the database. | 48 // The database context for deleting the database. |
45 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 49 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
46 | 50 |
47 // Provides access to the extension request context. | 51 // Provides access to the extension request context. |
48 scoped_refptr<URLRequestContextGetter> extension_request_context_; | 52 scoped_refptr<URLRequestContextGetter> extension_request_context_; |
49 | 53 |
50 // The URL of the extension we're removing data for. | 54 // The URL of the extension we're removing data for. |
51 GURL extension_url_; | 55 GURL extension_url_; |
52 | 56 |
53 // The security origin identifier for which we're deleting stuff. | 57 // The security origin identifier for which we're deleting stuff. |
54 string16 origin_id_; | 58 string16 origin_id_; |
55 | 59 |
56 // Webkit context for accessing the DOM storage helper. | 60 // Webkit context for accessing the DOM storage helper. |
57 scoped_refptr<WebKitContext> webkit_context_; | 61 scoped_refptr<WebKitContext> webkit_context_; |
58 | 62 |
59 DISALLOW_COPY_AND_ASSIGN(ExtensionDataDeleter); | 63 DISALLOW_COPY_AND_ASSIGN(ExtensionDataDeleter); |
60 }; | 64 }; |
61 | 65 |
62 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ | 66 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ |
OLD | NEW |