Index: chrome/browser/tab_contents/render_view_context_menu.cc |
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc |
index 7a8265cffdbf9df76fd6648d4e86c08da45b29d9..a0cb1498d01a407aca9129c49345a0c6bbc3c256 100644 |
--- a/chrome/browser/tab_contents/render_view_context_menu.cc |
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc |
@@ -14,6 +14,7 @@ |
#include "base/stl_util-inl.h" |
#include "base/string_util.h" |
#include "base/time.h" |
+#include "base/utf_string_conversions.h" |
#include "chrome/app/chrome_command_ids.h" |
#include "chrome/browser/autocomplete/autocomplete_classifier.h" |
#include "chrome/browser/autocomplete/autocomplete_edit.h" |
@@ -575,7 +576,8 @@ void RenderViewContextMenu::AppendSearchProvider() { |
return; |
AutocompleteMatch match; |
- profile_->GetAutocompleteClassifier()->Classify(params_.selection_text, |
+ profile_->GetAutocompleteClassifier()->Classify( |
+ UTF16ToWideHack(params_.selection_text), |
std::wstring(), false, &match, NULL); |
selection_navigation_url_ = match.destination_url; |
if (!selection_navigation_url_.is_valid()) |
@@ -1430,7 +1432,7 @@ bool RenderViewContextMenu::IsDevCommandEnabled(int id) const { |
} |
string16 RenderViewContextMenu::PrintableSelectionText() { |
- return l10n_util::TruncateString(WideToUTF16Hack(params_.selection_text), |
+ return l10n_util::TruncateString(params_.selection_text, |
kMaxSelectionTextLength); |
} |