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

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 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..ac795276c0ab7a99aaccc89d3e5ebb1bffd51820 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -560,6 +560,14 @@ 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. The webapp_registry makes a JNI call into a Java-side
+ // AsyncTask, so don't wait for the reply.
+ waiting_for_clear_webapp_history_ = true;
+ webapp_registry_->ClearWebappHistory(
+ base::Bind(&BrowsingDataRemover::OnClearedWebappHistory,
+ weak_ptr_factory_.GetWeakPtr()));
#endif
data_reduction_proxy::DataReductionProxySettings*
@@ -929,6 +937,8 @@ void BrowsingDataRemover::RemoveImpl(const TimeRange& time_range,
#if BUILDFLAG(ANDROID_JAVA_UI)
if (remove_mask & REMOVE_WEBAPP_DATA) {
+ // Clear all data associated with registered webapps. The webapp_registry
+ // makes a JNI call into a Java-side AsyncTask, so don't wait for the reply.
waiting_for_clear_webapp_data_ = true;
webapp_registry_->UnregisterWebapps(
base::Bind(&BrowsingDataRemover::OnClearedWebappData,
@@ -1019,6 +1029,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 +1229,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