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

Side by Side Diff: chrome/browser/autocomplete/history_quick_provider_unittest.cc

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/omnibox/browser/history_quick_provider.h" 5 #include "components/omnibox/browser/history_quick_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 url_(url) { 161 url_(url) {
162 } 162 }
163 163
164 bool RunOnDBThread(history::HistoryBackend* backend, 164 bool RunOnDBThread(history::HistoryBackend* backend,
165 history::HistoryDatabase* db) override { 165 history::HistoryDatabase* db) override {
166 *result_storage_ = backend->GetURL(url_, NULL); 166 *result_storage_ = backend->GetURL(url_, NULL);
167 return true; 167 return true;
168 } 168 }
169 169
170 void DoneRunOnMainThread() override { 170 void DoneRunOnMainThread() override {
171 base::MessageLoop::current()->Quit(); 171 base::MessageLoop::current()->QuitWhenIdle();
172 } 172 }
173 173
174 private: 174 private:
175 ~GetURLTask() override {} 175 ~GetURLTask() override {}
176 176
177 bool* result_storage_; 177 bool* result_storage_;
178 const GURL url_; 178 const GURL url_;
179 179
180 DISALLOW_COPY_AND_ASSIGN(GetURLTask); 180 DISALLOW_COPY_AND_ASSIGN(GetURLTask);
181 }; 181 };
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 883
884 TEST_F(HQPOrderingTest, TEAMatch) { 884 TEST_F(HQPOrderingTest, TEAMatch) {
885 std::vector<std::string> expected_urls; 885 std::vector<std::string> expected_urls;
886 expected_urls.push_back("http://www.teamliquid.net/"); 886 expected_urls.push_back("http://www.teamliquid.net/");
887 expected_urls.push_back("http://www.teamliquid.net/tlpd"); 887 expected_urls.push_back("http://www.teamliquid.net/tlpd");
888 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); 888 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players");
889 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, 889 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true,
890 ASCIIToUTF16("www.teamliquid.net"), 890 ASCIIToUTF16("www.teamliquid.net"),
891 ASCIIToUTF16("mliquid.net")); 891 ASCIIToUTF16("mliquid.net"));
892 } 892 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698