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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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"
(...skipping 15 matching lines...) Expand all
26 26
27 class ChromeAppCacheService; 27 class ChromeAppCacheService;
28 class ExtensionSettingsBackend; 28 class ExtensionSettingsBackend;
29 class Profile; 29 class Profile;
30 class WebKitContext; 30 class WebKitContext;
31 31
32 // A helper class that takes care of removing local storage, databases and 32 // A helper class that takes care of removing local storage, databases and
33 // cookies for a given extension. This is used by 33 // cookies for a given extension. This is used by
34 // ExtensionService::ClearExtensionData() upon uninstalling an extension. 34 // ExtensionService::ClearExtensionData() upon uninstalling an extension.
35 class ExtensionDataDeleter 35 class ExtensionDataDeleter
36 : public base::RefCountedThreadSafe<ExtensionDataDeleter, 36 : public base::RefCountedThreadSafe<
37 BrowserThread::DeleteOnUIThread> { 37 ExtensionDataDeleter, content::BrowserThread::DeleteOnUIThread> {
38 public: 38 public:
39 // Starts removing data. The extension should not be running when this is 39 // Starts removing data. The extension should not be running when this is
40 // called. Cookies are deleted on the current thread, local storage and 40 // called. Cookies are deleted on the current thread, local storage and
41 // databases/settings are deleted asynchronously on the webkit and file 41 // databases/settings are deleted asynchronously on the webkit and file
42 // threads, respectively. This function must be called from the UI thread. 42 // threads, respectively. This function must be called from the UI thread.
43 static void StartDeleting( 43 static void StartDeleting(
44 Profile* profile, 44 Profile* profile,
45 const std::string& extension_id, 45 const std::string& extension_id,
46 const GURL& storage_origin, 46 const GURL& storage_origin,
47 bool is_storage_isolated); 47 bool is_storage_isolated);
48 48
49 private: 49 private:
50 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; 50 friend struct content::BrowserThread::DeleteOnThread<
51 content::BrowserThread::UI>;
51 friend class DeleteTask<ExtensionDataDeleter>; 52 friend class DeleteTask<ExtensionDataDeleter>;
52 53
53 ExtensionDataDeleter( 54 ExtensionDataDeleter(
54 Profile* profile, 55 Profile* profile,
55 const std::string& extension_id, 56 const std::string& extension_id,
56 const GURL& storage_origin, 57 const GURL& storage_origin,
57 bool is_storage_isolated); 58 bool is_storage_isolated);
58 ~ExtensionDataDeleter(); 59 ~ExtensionDataDeleter();
59 60
60 // Deletes the cookies for the extension. May only be called on the io 61 // Deletes the cookies for the extension. May only be called on the io
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 scoped_refptr<ChromeAppCacheService> appcache_service_; 109 scoped_refptr<ChromeAppCacheService> appcache_service_;
109 110
110 // If non-empty, the extension we're deleting is an isolated app, and this 111 // If non-empty, the extension we're deleting is an isolated app, and this
111 // is its directory which we should delete. 112 // is its directory which we should delete.
112 FilePath isolated_app_path_; 113 FilePath isolated_app_path_;
113 114
114 DISALLOW_COPY_AND_ASSIGN(ExtensionDataDeleter); 115 DISALLOW_COPY_AND_ASSIGN(ExtensionDataDeleter);
115 }; 116 };
116 117
117 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ 118 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_cookies_api.cc ('k') | chrome/browser/extensions/extension_data_deleter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698