Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm |
=================================================================== |
--- chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (revision 71499) |
+++ chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm (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. |
@@ -527,8 +527,7 @@ |
NSImage* LocationBarViewMac::GetKeywordImage(const std::wstring& keyword) { |
const TemplateURL* template_url = |
- profile_->GetTemplateURLModel()->GetTemplateURLForKeyword( |
- WideToUTF16Hack(keyword)); |
+ profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword); |
if (template_url && template_url->IsExtensionKeyword()) { |
const SkBitmap& bitmap = profile_->GetExtensionService()-> |
GetOmniboxIcon(template_url->GetExtensionId()); |
@@ -657,11 +656,11 @@ |
// Get the keyword to use for keyword-search and hinting. |
const std::wstring keyword(edit_view_->model()->keyword()); |
- string16 short_name; |
+ std::wstring short_name; |
bool is_extension_keyword = false; |
if (!keyword.empty()) { |
short_name = profile_->GetTemplateURLModel()-> |
- GetKeywordShortName(WideToUTF16Hack(keyword), &is_extension_keyword); |
+ GetKeywordShortName(keyword, &is_extension_keyword); |
} |
const bool is_keyword_hint = edit_view_->model()->is_keyword_hint(); |
@@ -670,8 +669,7 @@ |
// Switch from location icon to keyword mode. |
location_icon_decoration_->SetVisible(false); |
selected_keyword_decoration_->SetVisible(true); |
- selected_keyword_decoration_->SetKeyword(UTF16ToWideHack(short_name), |
- is_extension_keyword); |
+ selected_keyword_decoration_->SetKeyword(short_name, is_extension_keyword); |
selected_keyword_decoration_->SetImage(GetKeywordImage(keyword)); |
} else if (toolbar_model_->GetSecurityLevel() == ToolbarModel::EV_SECURE) { |
// Switch from location icon to show the EV bubble instead. |
@@ -681,7 +679,7 @@ |
std::wstring label(toolbar_model_->GetEVCertName()); |
ev_bubble_decoration_->SetFullLabel(base::SysWideToNSString(label)); |
} else if (!keyword.empty() && is_keyword_hint) { |
- keyword_hint_decoration_->SetKeyword(short_name, |
+ keyword_hint_decoration_->SetKeyword(WideToUTF16Hack(short_name), |
is_extension_keyword); |
keyword_hint_decoration_->SetVisible(true); |
} |