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

Unified Diff: chrome/browser/search_engines/template_url_service_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/safe_browsing/browser_feature_extractor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url_service_unittest.cc
diff --git a/chrome/browser/search_engines/template_url_service_unittest.cc b/chrome/browser/search_engines/template_url_service_unittest.cc
index a330d6c6661f9dc4e8a2928d20e58e91f817771b..c912fe757274e2c7eebeee78eb0a51eddb64e7da 100644
--- a/chrome/browser/search_engines/template_url_service_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_unittest.cc
@@ -11,7 +11,6 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/task/cancelable_task_tracker.h"
#include "base/test/mock_time_provider.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
@@ -69,14 +68,15 @@
struct QueryHistoryCallbackImpl {
QueryHistoryCallbackImpl() : success(false) {}
- void Callback(bool success,
- const history::URLRow& row,
- const history::VisitVector& visits) {
+ void Callback(HistoryService::Handle handle,
+ bool success,
+ const history::URLRow* row,
+ history::VisitVector* visits) {
this->success = success;
- if (success) {
- this->row = row;
- this->visits = visits;
- }
+ if (row)
+ this->row = *row;
+ if (visits)
+ this->visits = *visits;
}
bool success;
@@ -1071,13 +1071,11 @@
test_util_.profile()->BlockUntilHistoryProcessesPendingRequests();
// Query history for the generated url.
- base::CancelableTaskTracker tracker;
+ CancelableRequestConsumer consumer;
QueryHistoryCallbackImpl callback;
- history->QueryURL(GURL("http://keyword"),
- true,
- base::Bind(&QueryHistoryCallbackImpl::Callback,
- base::Unretained(&callback)),
- &tracker);
+ history->QueryURL(GURL("http://keyword"), true, &consumer,
+ base::Bind(&QueryHistoryCallbackImpl::Callback,
+ base::Unretained(&callback)));
// Wait for the request to be processed.
test_util_.profile()->BlockUntilHistoryProcessesPendingRequests();
« no previous file with comments | « chrome/browser/safe_browsing/browser_feature_extractor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698