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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 6322001: Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/testing_automation_provider.cc
===================================================================
--- chrome/browser/automation/testing_automation_provider.cc (revision 71269)
+++ chrome/browser/automation/testing_automation_provider.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -2687,9 +2687,9 @@
for (std::vector<const TemplateURL*>::const_iterator it =
template_urls.begin(); it != template_urls.end(); ++it) {
DictionaryValue* search_engine = new DictionaryValue;
- search_engine->SetString("short_name", WideToUTF8((*it)->short_name()));
- search_engine->SetString("description", WideToUTF8((*it)->description()));
- search_engine->SetString("keyword", WideToUTF8((*it)->keyword()));
+ search_engine->SetString("short_name", UTF16ToUTF8((*it)->short_name()));
+ search_engine->SetString("description", UTF16ToUTF8((*it)->description()));
+ search_engine->SetString("keyword", UTF16ToUTF8((*it)->keyword()));
search_engine->SetBoolean("in_default_list", (*it)->ShowInDefaultList());
search_engine->SetBoolean("is_default",
(*it) == url_model->GetDefaultSearchProvider());
@@ -2700,7 +2700,7 @@
search_engine->SetString("host", (*it)->url()->GetHost());
search_engine->SetString("path", (*it)->url()->GetPath());
search_engine->SetString("display_url",
- WideToUTF8((*it)->url()->DisplayURL()));
+ UTF16ToUTF8((*it)->url()->DisplayURL()));
search_engines->Append(search_engine);
}
return_value->Set("search_engines", search_engines);
@@ -2726,11 +2726,11 @@
return;
}
std::string new_ref_url = TemplateURLRef::DisplayURLToURLRef(
- UTF8ToWide(new_url));
+ UTF8ToUTF16(new_url));
scoped_ptr<KeywordEditorController> controller(
new KeywordEditorController(profile_));
if (args->GetString("keyword", &keyword)) {
- template_url = url_model->GetTemplateURLForKeyword(UTF8ToWide(keyword));
+ template_url = url_model->GetTemplateURLForKeyword(UTF8ToUTF16(keyword));
if (template_url == NULL) {
AutomationJSONReply(this, reply_message).SendError(
StringPrintf("No match for keyword: %s", keyword.c_str()));
@@ -2763,7 +2763,7 @@
return;
}
const TemplateURL* template_url(
- url_model->GetTemplateURLForKeyword(UTF8ToWide(keyword)));
+ url_model->GetTemplateURLForKeyword(UTF8ToUTF16(keyword)));
if (template_url == NULL) {
AutomationJSONReply(this, reply_message).SendError(
StringPrintf("No match for keyword: %s", keyword.c_str()));
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/dom_ui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698