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

Unified Diff: chrome/browser/safe_browsing/malware_details_history.cc

Issue 349153006: Port HistoryService::QueryRedirects{From,To} to CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_history.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/malware_details_history.cc
diff --git a/chrome/browser/safe_browsing/malware_details_history.cc b/chrome/browser/safe_browsing/malware_details_history.cc
index 6c0910f31107a656f79e19e8b6d61898d4efe879..d628a61d785ae89711091c29b9c4a58df56051af 100644
--- a/chrome/browser/safe_browsing/malware_details_history.cc
+++ b/chrome/browser/safe_browsing/malware_details_history.cc
@@ -97,23 +97,19 @@ void MalwareDetailsRedirectsCollector::GetRedirects(const GURL& url) {
history->QueryRedirectsTo(
url,
- &request_consumer_,
base::Bind(&MalwareDetailsRedirectsCollector::OnGotQueryRedirectsTo,
- base::Unretained(this)));
+ base::Unretained(this),
+ url),
+ &request_tracker_);
}
void MalwareDetailsRedirectsCollector::OnGotQueryRedirectsTo(
- HistoryService::Handle handle,
- GURL url,
- bool success,
- history::RedirectList* redirect_list) {
-
- if (success && redirect_list->size() > 0) {
+ const GURL& url,
+ const history::RedirectList* redirect_list) {
+ if (!redirect_list->empty()) {
std::vector<GURL> urllist;
urllist.push_back(url);
- for (size_t i = 0; i < redirect_list->size(); i++) {
- urllist.push_back(redirect_list->at(i));
- }
+ urllist.insert(urllist.end(), redirect_list->begin(), redirect_list->end());
redirects_urls_.push_back(urllist);
}
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_history.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698