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

Side by Side Diff: chrome/browser/extensions/extension_data_deleter.h

Issue 9425026: Remove getters for HTML5 related objects from the ResourceContext interface. Half of them weren't u… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix race condition Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_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 #pragma once 7 #pragma once
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/message_loop_helpers.h" 11 #include "base/message_loop_helpers.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 15
16 namespace webkit_database { 16 namespace content {
17 class DatabaseTracker; 17 class ResourceContext;
18 } 18 }
19 19
20 namespace fileapi { 20 namespace fileapi {
21 class FileSystemContext; 21 class FileSystemContext;
22 } 22 }
23 23
24 namespace net { 24 namespace net {
25 class URLRequestContextGetter; 25 class URLRequestContextGetter;
26 } 26 }
27 27
28 class ChromeAppCacheService; 28 namespace webkit_database {
29 class DatabaseTracker;
30 }
31
29 class Profile; 32 class Profile;
30 class WebKitContext; 33 class WebKitContext;
31 34
32 // A helper class that takes care of removing local storage, databases and 35 // A helper class that takes care of removing local storage, databases and
33 // cookies for a given extension. This is used by 36 // cookies for a given extension. This is used by
34 // ExtensionService::ClearExtensionData() upon uninstalling an extension. 37 // ExtensionService::ClearExtensionData() upon uninstalling an extension.
35 class ExtensionDataDeleter 38 class ExtensionDataDeleter
36 : public base::RefCountedThreadSafe< 39 : public base::RefCountedThreadSafe<
37 ExtensionDataDeleter, content::BrowserThread::DeleteOnUIThread> { 40 ExtensionDataDeleter, content::BrowserThread::DeleteOnUIThread> {
38 public: 41 public:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Deletes indexed db files for the extension. May only be called on the 76 // Deletes indexed db files for the extension. May only be called on the
74 // webkit thread. 77 // webkit thread.
75 void DeleteIndexedDBOnWebkitThread(); 78 void DeleteIndexedDBOnWebkitThread();
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(); 86 void DeleteAppcachesOnIOThread(content::ResourceContext* resource_context);
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 // Webkit context for accessing the DOM storage helper. 103 // Webkit context for accessing the DOM storage helper.
101 scoped_refptr<WebKitContext> webkit_context_; 104 scoped_refptr<WebKitContext> webkit_context_;
102 105
103 scoped_refptr<fileapi::FileSystemContext> file_system_context_; 106 scoped_refptr<fileapi::FileSystemContext> file_system_context_;
104 107
105 scoped_refptr<ChromeAppCacheService> appcache_service_;
106
107 // If non-empty, the extension we're deleting is an isolated app, and this 108 // If non-empty, the extension we're deleting is an isolated app, and this
108 // is its directory which we should delete. 109 // is its directory which we should delete.
109 FilePath isolated_app_path_; 110 FilePath isolated_app_path_;
110 111
111 DISALLOW_COPY_AND_ASSIGN(ExtensionDataDeleter); 112 DISALLOW_COPY_AND_ASSIGN(ExtensionDataDeleter);
112 }; 113 };
113 114
114 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ 115 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698