Chromium Code Reviews| 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 9f644d60c8b78fd27afff1a4738fd1896c86b4b7..9d6c25ea6f08cb20ad63b3ea7597f7b3af1a63f1 100644 |
| --- a/chrome/browser/browsing_data/browsing_data_remover.cc |
| +++ b/chrome/browser/browsing_data/browsing_data_remover.cc |
| @@ -288,14 +288,15 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask, |
| BrowsingDataHelper::EXTENSION), |
| "OriginTypeMask has been updated without updating user metrics"); |
| + std::set<GURL> restrict_urls; |
|
Mike West
2015/07/22 20:16:03
1. Why do we need a set here if we're adding a sin
Timo Reimann
2015/07/22 23:22:15
According to git history, the set was added back i
Mike West
2015/07/23 09:56:49
If there's a reasonable use case for multiple orig
Timo Reimann
2015/07/23 23:11:07
As of now, only for history::HistoryService::Expir
|
| + if (!remove_origin_.is_empty()) |
| + restrict_urls.insert(remove_origin_); |
| + |
| if ((remove_mask & REMOVE_HISTORY) && may_delete_history) { |
| history::HistoryService* history_service = |
| HistoryServiceFactory::GetForProfile( |
| profile_, ServiceAccessType::EXPLICIT_ACCESS); |
| if (history_service) { |
| - std::set<GURL> restrict_urls; |
| - if (!remove_origin_.is_empty()) |
| - restrict_urls.insert(remove_origin_); |
| content::RecordAction(UserMetricsAction("ClearBrowsingData_History")); |
| waiting_for_clear_history_ = true; |
| @@ -443,7 +444,9 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask, |
| content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); |
| content::DownloadManager* download_manager = |
| BrowserContext::GetDownloadManager(profile_); |
| - download_manager->RemoveDownloadsBetween(delete_begin_, delete_end_); |
| + download_manager->RemoveDownloadsBetween(restrict_urls, |
| + delete_begin_, |
| + delete_end_); |
| DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager( |
| download_manager); |
| download_prefs->SetSaveFilePath(download_prefs->DownloadPath()); |