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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 5712003: webkit: use string16 in ContextMenuParams (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works Created 10 years 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/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);
}
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/tab_contents/render_view_context_menu_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698