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

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: 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
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..0980926b530e1a741181d741ecaed3186c008843 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)),
+ &request_tracker_);
}
void MalwareDetailsRedirectsCollector::OnGotQueryRedirectsTo(
- HistoryService::Handle handle,
GURL url,
bool success,
- history::RedirectList* redirect_list) {
-
+ const history::RedirectList* redirect_list) {
if (success && redirect_list->size() > 0) {
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);
}

Powered by Google App Engine
This is Rietveld 408576698