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

Side by Side Diff: chrome/browser/sync/test/integration/search_engines_helper.cc

Issue 176843022: Move UTF16ToASCII, remove WideToASCII. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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/sync/test/integration/search_engines_helper.h" 5 #include "chrome/browser/sync/test/integration/search_engines_helper.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 21 matching lines...) Expand all
32 CHECK(*it); 32 CHECK(*it);
33 CHECK(map.find((*it)->sync_guid()) == map.end()); 33 CHECK(map.find((*it)->sync_guid()) == map.end());
34 map[(*it)->sync_guid()] = *it; 34 map[(*it)->sync_guid()] = *it;
35 } 35 }
36 36
37 return map; 37 return map;
38 } 38 }
39 39
40 std::string GetTURLInfoString(const TemplateURL* turl) { 40 std::string GetTURLInfoString(const TemplateURL* turl) {
41 DCHECK(turl); 41 DCHECK(turl);
42 return "TemplateURL: shortname: " + UTF16ToASCII(turl->short_name()) + 42 return "TemplateURL: shortname: " + base::UTF16ToASCII(turl->short_name()) +
43 " keyword: " + UTF16ToASCII(turl->keyword()) + " url: " + turl->url(); 43 " keyword: " + base::UTF16ToASCII(turl->keyword()) + " url: " +
44 turl->url();
44 } 45 }
45 46
46 bool TURLsMatch(const TemplateURL* turl1, const TemplateURL* turl2) { 47 bool TURLsMatch(const TemplateURL* turl1, const TemplateURL* turl2) {
47 CHECK(turl1); 48 CHECK(turl1);
48 CHECK(turl2); 49 CHECK(turl2);
49 bool result = (turl1->url() == turl2->url()) && 50 bool result = (turl1->url() == turl2->url()) &&
50 (turl1->keyword() == turl2->keyword()) && 51 (turl1->keyword() == turl2->keyword()) &&
51 (turl1->short_name() == turl2->short_name()); 52 (turl1->short_name() == turl2->short_name());
52 53
53 // Print some useful debug info. 54 // Print some useful debug info.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 service->SetDefaultSearchProvider(turl); 259 service->SetDefaultSearchProvider(turl);
259 if (test()->use_verifier()) { 260 if (test()->use_verifier()) {
260 TemplateURL* verifier_turl = 261 TemplateURL* verifier_turl =
261 GetVerifierService()->GetTemplateURLForKeyword(CreateKeyword(seed)); 262 GetVerifierService()->GetTemplateURLForKeyword(CreateKeyword(seed));
262 ASSERT_TRUE(verifier_turl); 263 ASSERT_TRUE(verifier_turl);
263 GetVerifierService()->SetDefaultSearchProvider(verifier_turl); 264 GetVerifierService()->SetDefaultSearchProvider(verifier_turl);
264 } 265 }
265 } 266 }
266 267
267 } // namespace search_engines_helper 268 } // namespace search_engines_helper
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698