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 9030031: Move InMemoryURLIndex Caching Operations to FILE Thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Syncing with hopes of pleasing trybot update Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/history/in_memory_url_index.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/in_memory_url_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698