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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.h

Issue 12500009: Add the ability to clear the shader disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/browsing_data_remover.h
diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h
index 3fdf686c8c19f3f3570143cf7f99bc4f2a3335de..5c29698613050bbbfa06325e7be42afa94151f78 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.h
+++ b/chrome/browser/browsing_data/browsing_data_remover.h
@@ -82,17 +82,18 @@ class BrowsingDataRemover : public content::NotificationObserver
REMOVE_WEBSQL = 1 << 11,
REMOVE_SERVER_BOUND_CERTS = 1 << 12,
REMOVE_CONTENT_LICENSES = 1 << 13,
+ REMOVE_SHADER_CACHE = 1 << 14,
// The following flag is used only in tests. In normal usage, hosted app
// data is controlled by the REMOVE_COOKIES flag, applied to the
// protected-web origin.
REMOVE_HOSTED_APP_DATA_TESTONLY = 1 << 31,
// "Site data" includes cookies, appcache, file systems, indexedDBs, local
- // storage, webSQL, and plugin data.
+ // storage, webSQL, shader, and plugin data.
REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS |
REMOVE_INDEXEDDB | REMOVE_LOCAL_STORAGE |
REMOVE_PLUGIN_DATA | REMOVE_WEBSQL |
- REMOVE_SERVER_BOUND_CERTS
+ REMOVE_SERVER_BOUND_CERTS | REMOVE_SHADER_CACHE
};
// When BrowsingDataRemover successfully removes data, a notification of type
@@ -339,6 +340,21 @@ class BrowsingDataRemover : public content::NotificationObserver
// Callback from the above method.
void OnClearedFormData();
+ // Callback when the shader cache has been deleted.
+ // Invokes NotifyAndDeleteIfDone.
+ void ClearedShaderCache();
+
+ // Invokes the ClearedShaderCache on the UI thread.
+ void ClearedShaderCacheOnIOThread();
+
+ // Invoked on the IO thread to delete from the shader cache.
+ void ClearShaderCacheOnIOThread(const base::FilePath path,
+ const base::Time delete_begin,
+ const base::Time delete_end);
jonathan.backer 2013/03/20 18:39:05 nit: formatting.
dsinclair 2013/03/21 17:46:59 Done.
+
+ // Performs the actual work to delete the shader cache.
+ void DoClearShaderCache(int rv);
jonathan.backer 2013/03/20 18:39:05 nix this.
dsinclair 2013/03/21 17:46:59 Done.
+
// Returns true if we're all done.
bool AllDone();
@@ -400,6 +416,7 @@ class BrowsingDataRemover : public content::NotificationObserver
bool waiting_for_clear_quota_managed_data_;
bool waiting_for_clear_server_bound_certs_;
bool waiting_for_clear_session_storage_;
+ bool waiting_for_clear_shader_cache_;
// Tracking how many origins need to be deleted, and whether we're finished
// gathering origins.
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | content/browser/gpu/shader_disk_cache_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698