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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <functional> | 10 #include <functional> |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 const GURL url_; | 176 const GURL url_; |
177 | 177 |
178 DISALLOW_COPY_AND_ASSIGN(GetURLTask); | 178 DISALLOW_COPY_AND_ASSIGN(GetURLTask); |
179 }; | 179 }; |
180 | 180 |
181 class FakeAutocompleteProviderClient : public MockAutocompleteProviderClient { | 181 class FakeAutocompleteProviderClient : public MockAutocompleteProviderClient { |
182 public: | 182 public: |
183 FakeAutocompleteProviderClient() : pool_owner_(3, "Background Pool") { | 183 FakeAutocompleteProviderClient() : pool_owner_(3, "Background Pool") { |
184 bookmark_model_ = bookmarks::TestBookmarkClient::CreateModel(); | 184 bookmark_model_ = bookmarks::TestBookmarkClient::CreateModel(); |
185 if (history_dir_.CreateUniqueTempDir()) { | 185 if (history_dir_.CreateUniqueTempDir()) { |
186 history_service_ = history::CreateHistoryService( | 186 history_service_ = |
187 history_dir_.path(), true); | 187 history::CreateHistoryService(history_dir_.GetPath(), true); |
188 } | 188 } |
189 | 189 |
190 in_memory_url_index_.reset(new InMemoryURLIndex( | 190 in_memory_url_index_.reset(new InMemoryURLIndex( |
191 bookmark_model_.get(), history_service_.get(), nullptr, | 191 bookmark_model_.get(), history_service_.get(), nullptr, |
192 pool_owner_.pool().get(), history_dir_.path(), SchemeSet())); | 192 pool_owner_.pool().get(), history_dir_.GetPath(), SchemeSet())); |
193 in_memory_url_index_->Init(); | 193 in_memory_url_index_->Init(); |
194 } | 194 } |
195 | 195 |
196 const AutocompleteSchemeClassifier& GetSchemeClassifier() const override { | 196 const AutocompleteSchemeClassifier& GetSchemeClassifier() const override { |
197 return scheme_classifier_; | 197 return scheme_classifier_; |
198 } | 198 } |
199 | 199 |
200 const SearchTermsData& GetSearchTermsData() const override { | 200 const SearchTermsData& GetSearchTermsData() const override { |
201 return search_terms_data_; | 201 return search_terms_data_; |
202 } | 202 } |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 | 898 |
899 TEST_F(HQPOrderingTest, TEAMatch) { | 899 TEST_F(HQPOrderingTest, TEAMatch) { |
900 std::vector<std::string> expected_urls; | 900 std::vector<std::string> expected_urls; |
901 expected_urls.push_back("http://www.teamliquid.net/"); | 901 expected_urls.push_back("http://www.teamliquid.net/"); |
902 expected_urls.push_back("http://www.teamliquid.net/tlpd"); | 902 expected_urls.push_back("http://www.teamliquid.net/tlpd"); |
903 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); | 903 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); |
904 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, | 904 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, |
905 ASCIIToUTF16("www.teamliquid.net"), | 905 ASCIIToUTF16("www.teamliquid.net"), |
906 ASCIIToUTF16("mliquid.net")); | 906 ASCIIToUTF16("mliquid.net")); |
907 } | 907 } |
OLD | NEW |