| 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 c912fe757274e2c7eebeee78eb0a51eddb64e7da..a330d6c6661f9dc4e8a2928d20e58e91f817771b 100644
|
| --- a/chrome/browser/search_engines/template_url_service_unittest.cc
|
| +++ b/chrome/browser/search_engines/template_url_service_unittest.cc
|
| @@ -11,6 +11,7 @@
|
| #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"
|
| @@ -68,15 +69,14 @@ std::string TestSearchTermsData::GoogleBaseURLValue() const {
|
| struct QueryHistoryCallbackImpl {
|
| QueryHistoryCallbackImpl() : success(false) {}
|
|
|
| - void Callback(HistoryService::Handle handle,
|
| - bool success,
|
| - const history::URLRow* row,
|
| - history::VisitVector* visits) {
|
| + void Callback(bool success,
|
| + const history::URLRow& row,
|
| + const history::VisitVector& visits) {
|
| this->success = success;
|
| - if (row)
|
| - this->row = *row;
|
| - if (visits)
|
| - this->visits = *visits;
|
| + if (success) {
|
| + this->row = row;
|
| + this->visits = visits;
|
| + }
|
| }
|
|
|
| bool success;
|
| @@ -1071,11 +1071,13 @@ TEST_F(TemplateURLServiceTest, GenerateVisitOnKeyword) {
|
| test_util_.profile()->BlockUntilHistoryProcessesPendingRequests();
|
|
|
| // Query history for the generated url.
|
| - CancelableRequestConsumer consumer;
|
| + base::CancelableTaskTracker tracker;
|
| QueryHistoryCallbackImpl callback;
|
| - history->QueryURL(GURL("http://keyword"), true, &consumer,
|
| - base::Bind(&QueryHistoryCallbackImpl::Callback,
|
| - base::Unretained(&callback)));
|
| + history->QueryURL(GURL("http://keyword"),
|
| + true,
|
| + base::Bind(&QueryHistoryCallbackImpl::Callback,
|
| + base::Unretained(&callback)),
|
| + &tracker);
|
|
|
| // Wait for the request to be processed.
|
| test_util_.profile()->BlockUntilHistoryProcessesPendingRequests();
|
|
|