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

Side by Side Diff: chrome/browser/extensions/data_deleter.cc

Issue 10837230: Move StoragePartition into content/public and remove BrowserContext::GetDOMStorageContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove DISALLOW_COPY_AND_ASSIGN, and change RPH::CreateMessageFilters() to not suddenly isolate all… Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/data_deleter.h" 5 #include "chrome/browser/extensions/data_deleter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/settings/settings_frontend.h" 10 #include "chrome/browser/extensions/settings/settings_frontend.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/common/chrome_constants.h" 12 #include "chrome/common/chrome_constants.h"
13 #include "chrome/common/extensions/extension.h" 13 #include "chrome/common/extensions/extension.h"
14 #include "chrome/common/url_constants.h" 14 #include "chrome/common/url_constants.h"
15 #include "content/public/browser/dom_storage_context.h" 15 #include "content/public/browser/dom_storage_context.h"
16 #include "content/public/browser/indexed_db_context.h" 16 #include "content/public/browser/indexed_db_context.h"
17 #include "content/public/browser/resource_context.h" 17 #include "content/public/browser/resource_context.h"
18 #include "content/public/browser/storage_partition.h"
18 #include "net/base/completion_callback.h" 19 #include "net/base/completion_callback.h"
19 #include "net/base/net_errors.h" 20 #include "net/base/net_errors.h"
20 #include "net/cookies/cookie_monster.h" 21 #include "net/cookies/cookie_monster.h"
21 #include "net/url_request/url_request_context.h" 22 #include "net/url_request/url_request_context.h"
22 #include "net/url_request/url_request_context_getter.h" 23 #include "net/url_request/url_request_context_getter.h"
23 #include "webkit/appcache/appcache_service.h" 24 #include "webkit/appcache/appcache_service.h"
24 #include "webkit/database/database_tracker.h" 25 #include "webkit/database/database_tracker.h"
25 #include "webkit/database/database_util.h" 26 #include "webkit/database/database_util.h"
26 #include "webkit/fileapi/file_system_context.h" 27 #include "webkit/fileapi/file_system_context.h"
27 28
(...skipping 12 matching lines...) Expand all
40 bool is_storage_isolated) { 41 bool is_storage_isolated) {
41 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
42 DCHECK(profile); 43 DCHECK(profile);
43 scoped_refptr<DataDeleter> deleter = new DataDeleter( 44 scoped_refptr<DataDeleter> deleter = new DataDeleter(
44 profile, extension_id, storage_origin, is_storage_isolated); 45 profile, extension_id, storage_origin, is_storage_isolated);
45 46
46 BrowserThread::PostTask( 47 BrowserThread::PostTask(
47 BrowserThread::IO, FROM_HERE, 48 BrowserThread::IO, FROM_HERE,
48 base::Bind(&DataDeleter::DeleteCookiesOnIOThread, deleter)); 49 base::Bind(&DataDeleter::DeleteCookiesOnIOThread, deleter));
49 50
50 BrowserContext::GetDefaultDOMStorageContext(profile)->DeleteOrigin( 51 content::BrowserContext::GetDefaultStoragePartition(profile)->
51 storage_origin); 52 GetDOMStorageContext()->DeleteOrigin(storage_origin);
52 53
53 BrowserThread::PostTask( 54 BrowserThread::PostTask(
54 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, 55 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE,
55 base::Bind( 56 base::Bind(
56 &DataDeleter::DeleteIndexedDBOnWebkitThread, 57 &DataDeleter::DeleteIndexedDBOnWebkitThread,
57 deleter, 58 deleter,
58 make_scoped_refptr(BrowserContext::GetIndexedDBContext(profile)))); 59 make_scoped_refptr(BrowserContext::GetIndexedDBContext(profile))));
59 60
60 BrowserThread::PostTask( 61 BrowserThread::PostTask(
61 BrowserThread::FILE, FROM_HERE, 62 BrowserThread::FILE, FROM_HERE,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 file_util::Delete(isolated_app_path_, true); 138 file_util::Delete(isolated_app_path_, true);
138 } 139 }
139 140
140 void DataDeleter::DeleteAppcachesOnIOThread(ResourceContext* context) { 141 void DataDeleter::DeleteAppcachesOnIOThread(ResourceContext* context) {
141 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 142 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
142 ResourceContext::GetAppCacheService(context)->DeleteAppCachesForOrigin( 143 ResourceContext::GetAppCacheService(context)->DeleteAppCachesForOrigin(
143 storage_origin_, net::CompletionCallback()); 144 storage_origin_, net::CompletionCallback());
144 } 145 }
145 146
146 } // namespace extensions 147 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover_unittest.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698