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

Side by Side Diff: content/public/browser/browser_context.h

Issue 11419307: Garbage Collect the Storage directory on next profile start after an extension uninstall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address mpcomplete's comments Created 8 years 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 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/memory/scoped_ptr.h"
10 #include "base/supports_user_data.h" 11 #include "base/supports_user_data.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
12 13
13 namespace net { 14 namespace net {
14 class URLRequestContextGetter; 15 class URLRequestContextGetter;
15 } 16 }
16 17
17 namespace quota { 18 namespace quota {
18 class SpecialStoragePolicy; 19 class SpecialStoragePolicy;
19 } 20 }
(...skipping 25 matching lines...) Expand all
45 46
46 static content::StoragePartition* GetStoragePartition( 47 static content::StoragePartition* GetStoragePartition(
47 BrowserContext* browser_context, SiteInstance* site_instance); 48 BrowserContext* browser_context, SiteInstance* site_instance);
48 static content::StoragePartition* GetStoragePartitionForSite( 49 static content::StoragePartition* GetStoragePartitionForSite(
49 BrowserContext* browser_context, const GURL& site); 50 BrowserContext* browser_context, const GURL& site);
50 static void ForEachStoragePartition( 51 static void ForEachStoragePartition(
51 BrowserContext* browser_context, 52 BrowserContext* browser_context,
52 const StoragePartitionCallback& callback); 53 const StoragePartitionCallback& callback);
53 static void AsyncObliterateStoragePartition( 54 static void AsyncObliterateStoragePartition(
54 BrowserContext* browser_context, 55 BrowserContext* browser_context,
55 const GURL& site); 56 const GURL& site,
57 const base::Closure& on_gc_required);
58
59 // This function clears the contents of |active_paths| but does not take
60 // ownership of the pointer.
61 static void GarbageCollectStoragePartitions(
62 BrowserContext* browser_context,
63 scoped_ptr<base::hash_set<FilePath> > active_paths,
64 const base::Closure& done);
56 65
57 // DON'T USE THIS. GetDefaultStoragePartition() is going away. 66 // DON'T USE THIS. GetDefaultStoragePartition() is going away.
58 // Use GetStoragePartition() instead. Ask ajwong@ if you have problems. 67 // Use GetStoragePartition() instead. Ask ajwong@ if you have problems.
59 static content::StoragePartition* GetDefaultStoragePartition( 68 static content::StoragePartition* GetDefaultStoragePartition(
60 BrowserContext* browser_context); 69 BrowserContext* browser_context);
61 70
62 // Ensures that the corresponding ResourceContext is initialized. Normally the 71 // Ensures that the corresponding ResourceContext is initialized. Normally the
63 // BrowserContext initializs the corresponding getters when its objects are 72 // BrowserContext initializs the corresponding getters when its objects are
64 // created, but if the embedder wants to pass the ResourceContext to another 73 // created, but if the embedder wants to pass the ResourceContext to another
65 // thread before they use BrowserContext, they should call this to make sure 74 // thread before they use BrowserContext, they should call this to make sure
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 struct hash<content::BrowserContext*> { 152 struct hash<content::BrowserContext*> {
144 std::size_t operator()(content::BrowserContext* const& p) const { 153 std::size_t operator()(content::BrowserContext* const& p) const {
145 return reinterpret_cast<std::size_t>(p); 154 return reinterpret_cast<std::size_t>(p);
146 } 155 }
147 }; 156 };
148 157
149 } // namespace BASE_HASH_NAMESPACE 158 } // namespace BASE_HASH_NAMESPACE
150 #endif 159 #endif
151 160
152 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 161 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698