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

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

Issue 37843003: BrowsingDataRemover, (re)use StoragePartition deletion code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from miket@ Created 7 years, 2 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 ff31f099237191e6b98cc53553072ccd40a61bb0..2af5fe69a0e4a969ea410562fcbc5bfdc5c034a0 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.h
+++ b/chrome/browser/browsing_data/browsing_data_remover.h
@@ -155,10 +155,6 @@ class BrowsingDataRemover
// Calculate the begin time for the deletion range specified by |time_period|.
static base::Time CalculateBeginDeleteTime(TimePeriod time_period);
- // Quota managed data uses a different bitmask for types than
- // BrowsingDataRemover uses. This method generates that mask.
- static int GenerateQuotaClientMask(int remove_mask);
-
// Is the BrowsingDataRemover currently in the process of removing data?
static bool is_removing() { return is_removing_; }
@@ -297,44 +293,6 @@ class BrowsingDataRemover
void ClearPnaclCacheOnIOThread(base::Time begin, base::Time end);
#endif
- // Invoked on the UI thread to delete local storage.
- void ClearLocalStorageOnUIThread();
-
- // Callback to deal with the list gathered in ClearLocalStorageOnUIThread.
- void OnGotLocalStorageUsageInfo(
- const std::vector<content::LocalStorageUsageInfo>& infos);
-
- // Invoked on the UI thread to delete session storage.
- void ClearSessionStorageOnUIThread();
-
- // Callback to deal with the list gathered in ClearSessionStorageOnUIThread.
- void OnGotSessionStorageUsageInfo(
- const std::vector<content::SessionStorageUsageInfo>& infos);
-
- // Invoked on the IO thread to delete all storage types managed by the quota
- // system: AppCache, Databases, FileSystems.
- void ClearQuotaManagedDataOnIOThread();
-
- // Callback to respond to QuotaManager::GetOriginsModifiedSince, which is the
- // core of 'ClearQuotaManagedDataOnIOThread'.
- void OnGotQuotaManagedOrigins(const std::set<GURL>& origins,
- quota::StorageType type);
-
- // Callback responding to deletion of a single quota managed origin's
- // persistent data
- void OnQuotaManagedOriginDeletion(const GURL& origin,
- quota::StorageType type,
- quota::QuotaStatusCode);
-
- // Called to check whether all temporary and persistent origin data that
- // should be deleted has been deleted. If everything's good to go, invokes
- // OnQuotaManagedDataDeleted on the UI thread.
- void CheckQuotaManagedDataDeletionStatus();
-
- // Completion handler that runs on the UI thread once persistent data has been
- // deleted. Updates the waiting flag and invokes NotifyAndDeleteIfDone.
- void OnQuotaManagedDataDeleted();
-
// Callback for when Cookies has been deleted. Invokes NotifyAndDeleteIfDone.
void OnClearedCookies(int num_deleted);
@@ -361,15 +319,9 @@ class BrowsingDataRemover
// been deleted.
void OnClearedAutofillOriginURLs();
- // Callback for when the shader cache has been deleted.
- // Invokes NotifyAndDeleteIfDone.
- void ClearedShaderCache();
- // Invoked on the IO thread to delete from the shader cache.
- void ClearShaderCacheOnUIThread();
-
- // Callback on UI thread when the WebRTC identities are cleared.
- void OnClearWebRTCIdentityStore();
+ // Callback on UI thread when the storage partition related data are cleared.
+ void OnClearedStoragePartitionData();
// Returns true if we're all done.
bool AllDone();
@@ -377,13 +329,6 @@ class BrowsingDataRemover
// Profile we're to remove from.
Profile* profile_;
- // The QuotaManager is owned by the profile; we can use a raw pointer here,
- // and rely on the profile to destroy the object whenever it's reasonable.
- quota::QuotaManager* quota_manager_;
-
- // The DOMStorageContext is owned by the profile; we'll store a raw pointer.
- content::DOMStorageContext* dom_storage_context_;
-
// 'Protected' origins are not subject to data removal.
scoped_refptr<ExtensionSpecialStoragePolicy> special_storage_policy_;
@@ -423,7 +368,7 @@ class BrowsingDataRemover
bool waiting_for_clear_form_;
bool waiting_for_clear_history_;
bool waiting_for_clear_hostname_resolution_cache_;
- bool waiting_for_clear_local_storage_;
+ bool waiting_for_clear_keyword_data_;
bool waiting_for_clear_logged_in_predictor_;
bool waiting_for_clear_nacl_cache_;
bool waiting_for_clear_network_predictor_;
@@ -432,15 +377,7 @@ class BrowsingDataRemover
bool waiting_for_clear_pnacl_cache_;
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_;
- bool waiting_for_clear_webrtc_identity_store_;
- bool waiting_for_clear_keyword_data_;
-
- // Tracking how many origins need to be deleted, and whether we're finished
- // gathering origins.
- int quota_managed_origins_to_delete_count_;
- int quota_managed_storage_types_to_delete_count_;
+ bool waiting_for_clear_storage_partition_data_;
// The removal mask for the current removal operation.
int remove_mask_;

Powered by Google App Engine
This is Rietveld 408576698