| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |