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

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

Issue 2351113005: [Reland] Refactor WebappRegistry into a singleton instance. (Closed)
Patch Set: Checkstyle import order has changed overnight argh Created 4 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.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index fcd6a796af5f5a997392355b4f463b871dc62c15..e6b80a48e975bbb45d206bfae636d2f8f2a0fa7f 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -702,13 +702,8 @@ void BrowsingDataRemover::RemoveImpl(
}
// 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_->ClearWebappHistoryForUrls(
- filter,
- base::Bind(&BrowsingDataRemover::OnClearedWebappHistory,
- weak_ptr_factory_.GetWeakPtr()));
+ // registered webapps.
+ webapp_registry_->ClearWebappHistoryForUrls(filter);
#endif
data_reduction_proxy::DataReductionProxySettings*
@@ -1160,15 +1155,9 @@ void BrowsingDataRemover::RemoveImpl(
}
#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_->UnregisterWebappsForUrls(
- filter,
- base::Bind(&BrowsingDataRemover::OnClearedWebappData,
- weak_ptr_factory_.GetWeakPtr()));
- }
+ // Clear all data associated with registered webapps.
+ if (remove_mask & REMOVE_WEBAPP_DATA)
+ webapp_registry_->UnregisterWebappsForUrls(filter);
// For now we're considering offline pages as cache, so if we're removing
// cache we should remove offline pages as well.
@@ -1276,8 +1265,6 @@ bool BrowsingDataRemover::AllDone() {
!waiting_for_clear_pnacl_cache_ &&
#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)
@@ -1536,18 +1523,6 @@ void BrowsingDataRemover::OnClearedPrecacheHistory() {
NotifyIfDone();
}
-void BrowsingDataRemover::OnClearedWebappData() {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
- waiting_for_clear_webapp_data_ = false;
- NotifyIfDone();
-}
-
-void BrowsingDataRemover::OnClearedWebappHistory() {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
- waiting_for_clear_webapp_history_ = false;
- NotifyIfDone();
-}
-
void BrowsingDataRemover::OnClearedOfflinePageData(
offline_pages::OfflinePageModel::DeletePageResult result) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.h ('k') | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698