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 "chrome/browser/autocomplete/history_quick_provider.h" | 5 #include "chrome/browser/autocomplete/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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 void HistoryQuickProviderTest::TearDown() { | 145 void HistoryQuickProviderTest::TearDown() { |
146 provider_ = NULL; | 146 provider_ = NULL; |
147 } | 147 } |
148 | 148 |
149 bool HistoryQuickProviderTest::UpdateURL(const history::URLRow& row) { | 149 bool HistoryQuickProviderTest::UpdateURL(const history::URLRow& row) { |
150 history::InMemoryURLIndex* index = provider_->GetIndex(); | 150 history::InMemoryURLIndex* index = provider_->GetIndex(); |
151 DCHECK(index); | 151 DCHECK(index); |
152 history::URLIndexPrivateData* private_data = index->private_data(); | 152 history::URLIndexPrivateData* private_data = index->private_data(); |
153 DCHECK(private_data); | 153 DCHECK(private_data); |
154 return private_data->UpdateURL(row); | 154 return private_data->UpdateURL(row, index->languages_, |
| 155 index->scheme_whitelist_); |
155 } | 156 } |
156 | 157 |
157 void HistoryQuickProviderTest::OnProviderUpdate(bool updated_matches) { | 158 void HistoryQuickProviderTest::OnProviderUpdate(bool updated_matches) { |
158 MessageLoop::current()->Quit(); | 159 MessageLoop::current()->Quit(); |
159 } | 160 } |
160 | 161 |
161 void HistoryQuickProviderTest::GetTestData(size_t* data_count, | 162 void HistoryQuickProviderTest::GetTestData(size_t* data_count, |
162 TestURLInfo** test_data) { | 163 TestURLInfo** test_data) { |
163 DCHECK(data_count); | 164 DCHECK(data_count); |
164 DCHECK(test_data); | 165 DCHECK(test_data); |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 | 488 |
488 TEST_F(HQPOrderingTest, TEAMatch) { | 489 TEST_F(HQPOrderingTest, TEAMatch) { |
489 std::vector<std::string> expected_urls; | 490 std::vector<std::string> expected_urls; |
490 expected_urls.push_back("http://www.teamliquid.net/"); | 491 expected_urls.push_back("http://www.teamliquid.net/"); |
491 expected_urls.push_back("http://www.teamliquid.net/tlpd"); | 492 expected_urls.push_back("http://www.teamliquid.net/tlpd"); |
492 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); | 493 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); |
493 RunTest(ASCIIToUTF16("tea"), expected_urls, true, | 494 RunTest(ASCIIToUTF16("tea"), expected_urls, true, |
494 ASCIIToUTF16("www.teamliquid.net")); | 495 ASCIIToUTF16("www.teamliquid.net")); |
495 } | 496 } |
496 | 497 |
OLD | NEW |