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

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

Issue 109013006: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 12 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
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/contact_provider_chromeos.h" 5 #include "chrome/browser/autocomplete/contact_provider_chromeos.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ASSERT_TRUE(profile_manager_->SetUp()); 58 ASSERT_TRUE(profile_manager_->SetUp());
59 profile_ = profile_manager_->CreateTestingProfile("test_profile"); 59 profile_ = profile_manager_->CreateTestingProfile("test_profile");
60 contact_manager_.reset(new contacts::ContactManagerStub(profile_)); 60 contact_manager_.reset(new contacts::ContactManagerStub(profile_));
61 contact_provider_ = 61 contact_provider_ =
62 new ContactProvider(NULL, profile_, contact_manager_->GetWeakPtr()); 62 new ContactProvider(NULL, profile_, contact_manager_->GetWeakPtr());
63 } 63 }
64 64
65 // Starts a (synchronous) query for |utf8_text| in |contact_provider_|. 65 // Starts a (synchronous) query for |utf8_text| in |contact_provider_|.
66 void StartQuery(const std::string& utf8_text) { 66 void StartQuery(const std::string& utf8_text) {
67 contact_provider_->Start( 67 contact_provider_->Start(
68 AutocompleteInput(UTF8ToUTF16(utf8_text), 68 AutocompleteInput(base::UTF8ToUTF16(utf8_text),
69 base::string16::npos, 69 base::string16::npos,
70 base::string16(), 70 base::string16(),
71 GURL(), 71 GURL(),
72 AutocompleteInput::INVALID_SPEC, 72 AutocompleteInput::INVALID_SPEC,
73 false, 73 false,
74 false, 74 false,
75 false, 75 false,
76 AutocompleteInput::ALL_MATCHES), 76 AutocompleteInput::ALL_MATCHES),
77 false); // minimal_changes 77 false); // minimal_changes
78 } 78 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 << "Expected contact ID " << exp_contact.contact_id() 274 << "Expected contact ID " << exp_contact.contact_id()
275 << " for match " << i << " but got " << match_id << " instead"; 275 << " for match " << i << " but got " << match_id << " instead";
276 if (i > 0) { 276 if (i > 0) {
277 EXPECT_LE(matches[i].relevance, previous_relevance) 277 EXPECT_LE(matches[i].relevance, previous_relevance)
278 << "Match " << i << " has greater relevance than previous match"; 278 << "Match " << i << " has greater relevance than previous match";
279 } 279 }
280 EXPECT_FALSE(matches[i].allowed_to_be_default_match); 280 EXPECT_FALSE(matches[i].allowed_to_be_default_match);
281 previous_relevance = matches[i].relevance; 281 previous_relevance = matches[i].relevance;
282 } 282 }
283 } 283 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/contact_provider_chromeos.cc ('k') | chrome/browser/autocomplete/extension_app_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698