| Index: chrome/browser/history/history_unittest.cc
|
| diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
|
| index f5ba8b2296fa10b8776c1cb0cddcdc51092105c3..600939c9b8e9fc242cd9cbce37be49215e6ca86f 100644
|
| --- a/chrome/browser/history/history_unittest.cc
|
| +++ b/chrome/browser/history/history_unittest.cc
|
| @@ -1073,23 +1073,24 @@ class HistoryTest : public testing::Test {
|
| // returning true on success. False means the URL was not found.
|
| bool QueryRedirectsFrom(HistoryService* history, const GURL& url) {
|
| history_service_->QueryRedirectsFrom(
|
| - url, &consumer_,
|
| + url,
|
| base::Bind(&HistoryTest::OnRedirectQueryComplete,
|
| - base::Unretained(this)));
|
| + base::Unretained(this)),
|
| + &tracker_);
|
| base::MessageLoop::current()->Run(); // Will be exited in *QueryComplete.
|
| return redirect_query_success_;
|
| }
|
|
|
| // Callback for QueryRedirects.
|
| - void OnRedirectQueryComplete(HistoryService::Handle handle,
|
| - GURL url,
|
| + void OnRedirectQueryComplete(GURL url,
|
| bool success,
|
| - history::RedirectList* redirects) {
|
| + const history::RedirectList* redirects) {
|
| + saved_redirects_.clear();
|
| redirect_query_success_ = success;
|
| - if (redirect_query_success_)
|
| - saved_redirects_.swap(*redirects);
|
| - else
|
| - saved_redirects_.clear();
|
| + if (redirect_query_success_) {
|
| + saved_redirects_.insert(
|
| + saved_redirects_.end(), redirects->begin(), redirects->end());
|
| + }
|
| base::MessageLoop::current()->Quit();
|
| }
|
|
|
|
|