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

Unified Diff: content/browser/browser_context.cc

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: Basic code done. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 79355bc3089bde7dda9c7c2caf68d33980c302ff..68a436664c7787004dfc5752bbdc528025f48b0a 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -94,8 +94,21 @@ void PurgeMemoryOnIOThread(appcache::AppCacheService* appcache_service) {
// static
void BrowserContext::AsyncObliterateStoragePartition(
BrowserContext* browser_context,
- const GURL& site) {
- GetStoragePartitionMap(browser_context)->AsyncObliterate(site);
+ const GURL& site,
+ const base::Closure& on_gc_required) {
+ GetStoragePartitionMap(browser_context)->AsyncObliterate(site, on_gc_required);
Charlie Reis 2012/12/05 02:25:40 Long line.
+}
+
+// static
+void BrowserContext::GarbageCollectStoragePartitions(
+ BrowserContext* browser_context,
+ base::hash_set<FilePath>* active_paths,
+ const base::Closure& done) {
+ scoped_ptr<base::hash_set<FilePath> > scoped_active_paths(
+ new base::hash_set<FilePath>());
+ scoped_active_paths->swap(*active_paths);
+ GetStoragePartitionMap(browser_context)->GarbageCollect(
+ scoped_active_paths.Pass(), done);
}
DownloadManager* BrowserContext::GetDownloadManager(

Powered by Google App Engine
This is Rietveld 408576698