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

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

Issue 1749603002: Store URLs in WebappDataStorage, and purge them when history is cleared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer comments. Add dependency patchset for unit test hanging Created 4 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.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index 0749c863c34d4328849d0b45b287deda6d580057..8a5b4f03f6e8557862f4c6b5092355d094375b55 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -560,6 +560,13 @@ void BrowsingDataRemover::RemoveImpl(const TimeRange& time_range,
base::Bind(&BrowsingDataRemover::OnClearedPrecacheHistory,
weak_ptr_factory_.GetWeakPtr()));
}
+
+ // Clear the history information (last launch time and origin URL) of any
+ // registered webapps.
+ waiting_for_clear_webapp_history_ = true;
+ webapp_registry_->ClearWebappHistory(
+ base::Bind(&BrowsingDataRemover::OnClearedWebappHistory,
+ weak_ptr_factory_.GetWeakPtr()));
#endif
data_reduction_proxy::DataReductionProxySettings*
@@ -1019,6 +1026,7 @@ bool BrowsingDataRemover::AllDone() {
#if BUILDFLAG(ANDROID_JAVA_UI)
!waiting_for_clear_precache_history_ &&
!waiting_for_clear_webapp_data_ &&
+ !waiting_for_clear_webapp_history_ &&
!waiting_for_clear_offline_page_data_ &&
#endif
#if defined(ENABLE_WEBRTC)
@@ -1218,6 +1226,12 @@ void BrowsingDataRemover::OnClearedWebappData() {
NotifyIfDone();
}
+void BrowsingDataRemover::OnClearedWebappHistory() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ waiting_for_clear_webapp_history_ = false;
+ NotifyIfDone();
+}
+
void BrowsingDataRemover::OnClearedOfflinePageData() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
waiting_for_clear_offline_page_data_ = false;

Powered by Google App Engine
This is Rietveld 408576698