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

Unified Diff: chrome/browser/search_engines/template_url_table_model.cc

Issue 6291003: Revert 71485 - Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://svn.chromium.org/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/search_engines/template_url_table_model.cc
===================================================================
--- chrome/browser/search_engines/template_url_table_model.cc (revision 71499)
+++ chrome/browser/search_engines/template_url_table_model.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -180,7 +180,7 @@
switch (col_id) {
case IDS_SEARCH_ENGINES_EDITOR_DESCRIPTION_COLUMN: {
- string16 url_short_name = url.short_name();
+ string16 url_short_name = WideToUTF16Hack(url.short_name());
// TODO(xji): Consider adding a special case if the short name is a URL,
// since those should always be displayed LTR. Please refer to
// http://crbug.com/6726 for more information.
@@ -195,7 +195,7 @@
case IDS_SEARCH_ENGINES_EDITOR_KEYWORD_COLUMN: {
// Keyword should be domain name. Force it to have LTR directionality.
- string16 keyword = url.keyword();
+ string16 keyword = WideToUTF16(url.keyword());
keyword = base::i18n::GetDisplayStringInLTRDirectionality(keyword);
return keyword;
}
@@ -279,7 +279,8 @@
DCHECK(index >= 0 && index <= RowCount());
const TemplateURL* template_url = &GetTemplateURL(index);
template_url_model_->RemoveObserver(this);
- template_url_model_->ResetTemplateURL(template_url, title, keyword, url);
+ template_url_model_->ResetTemplateURL(template_url, UTF16ToWideHack(title),
+ UTF16ToWideHack(keyword), url);
if (template_url_model_->GetDefaultSearchProvider() == template_url &&
!TemplateURL::SupportsReplacement(template_url)) {
// The entry was the default search provider, but the url has been modified

Powered by Google App Engine
This is Rietveld 408576698