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); |