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 05e0c2ed9b5fbccdb5183b0ba7a45ce8a5c9e7be..85d7443f7a22ee32a52433fa276e354cc04d2654 100644 |
--- a/chrome/browser/browsing_data/browsing_data_remover.cc |
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc |
@@ -879,6 +879,14 @@ void BrowsingDataRemover::RemoveImpl( |
storage_partition_remove_mask |= |
content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; |
+ |
+ // When clearing cache, wipe accumulated network related data |
+ // (TransportSecurityState and HttpServerPropertiesManager data). |
+ waiting_for_clear_networking_history_ = true; |
+ profile_->ClearNetworkingHistorySince( |
+ delete_begin_, |
+ base::Bind(&BrowsingDataRemover::OnClearedNetworkingHistory, |
+ weak_ptr_factory_.GetWeakPtr())); |
} |
if (remove_mask & REMOVE_WEBRTC_IDENTITY) { |
@@ -956,14 +964,6 @@ void BrowsingDataRemover::RemoveImpl( |
if ((remove_mask & (REMOVE_CACHE | REMOVE_COOKIES))) |
prefs->SetString(omnibox::kZeroSuggestCachedResults, std::string()); |
- // Always wipe accumulated network related data (TransportSecurityState and |
- // HttpServerPropertiesManager data). |
- waiting_for_clear_networking_history_ = true; |
- profile_->ClearNetworkingHistorySince( |
- delete_begin_, |
- base::Bind(&BrowsingDataRemover::OnClearedNetworkingHistory, |
- weak_ptr_factory_.GetWeakPtr())); |
- |
if (remove_mask & (REMOVE_COOKIES | REMOVE_HISTORY)) { |
domain_reliability::DomainReliabilityService* service = |
domain_reliability::DomainReliabilityServiceFactory:: |
@@ -1014,6 +1014,9 @@ void BrowsingDataRemover::RemoveImpl( |
choice = ONLY_CACHE; |
} |
+ // Notify in case all actions taken were synchronous. |
+ NotifyIfDone(); |
+ |
UMA_HISTOGRAM_ENUMERATION( |
"History.ClearBrowsingData.UserDeletedCookieOrCache", |
choice, MAX_CHOICE_VALUE); |