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

Unified Diff: chrome/browser/history/history_unittest.cc

Issue 330703005: Revert of Change HistoryService::QueryURL to use CancelableTaskTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « chrome/browser/history/history_service.cc ('k') | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_unittest.cc
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index 105e699a2e1febecfa85c806651509c8ccf912e8..66ed288d502c79aeb774530649f2d18ea64c3e96 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -39,7 +39,6 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/task/cancelable_task_tracker.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "chrome/browser/history/download_row.h"
@@ -971,23 +970,22 @@
// information about the given URL and returns true. If the URL was not
// found, this will return false and those structures will not be changed.
bool QueryURL(HistoryService* history, const GURL& url) {
- history_service_->QueryURL(
- url,
- true,
- base::Bind(&HistoryTest::SaveURLAndQuit, base::Unretained(this)),
- &tracker_);
+ history_service_->QueryURL(url, true, &consumer_,
+ base::Bind(&HistoryTest::SaveURLAndQuit,
+ base::Unretained(this)));
base::MessageLoop::current()->Run(); // Will be exited in SaveURLAndQuit.
return query_url_success_;
}
// Callback for HistoryService::QueryURL.
- void SaveURLAndQuit(bool success,
- const URLRow& url_row,
- const VisitVector& visits) {
+ void SaveURLAndQuit(HistoryService::Handle handle,
+ bool success,
+ const URLRow* url_row,
+ VisitVector* visit_vector) {
query_url_success_ = success;
if (query_url_success_) {
- query_url_row_ = url_row;
- query_url_visits_ = visits;
+ query_url_row_ = *url_row;
+ query_url_visits_.swap(*visit_vector);
} else {
query_url_row_ = URLRow();
query_url_visits_.clear();
@@ -1047,7 +1045,6 @@
bool redirect_query_success_;
// For history requests.
- base::CancelableTaskTracker tracker_;
CancelableRequestConsumer consumer_;
// For saving URL info after a call to QueryURL
« no previous file with comments | « chrome/browser/history/history_service.cc ('k') | chrome/browser/prerender/prerender_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698