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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_model.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/autocomplete/autocomplete_popup_model.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_popup_model.cc (revision 71269)
+++ chrome/browser/autocomplete/autocomplete_popup_model.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.
@@ -9,6 +9,7 @@
#include "unicode/ubidi.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/autocomplete/autocomplete_popup_view.h"
@@ -207,7 +208,7 @@
// If the current match is a keyword, return that as the selected keyword.
if (TemplateURL::SupportsReplacement(match.template_url)) {
- keyword->assign(match.template_url->keyword());
+ keyword->assign(UTF16ToWideHack(match.template_url->keyword()));
return false;
}
@@ -215,8 +216,8 @@
if (!profile_->GetTemplateURLModel())
return false;
profile_->GetTemplateURLModel()->Load();
- const std::wstring keyword_hint(
- TemplateURLModel::CleanUserInputKeyword(match.fill_into_edit));
+ const string16 keyword_hint(TemplateURLModel::CleanUserInputKeyword(
+ WideToUTF16Hack(match.fill_into_edit)));
if (keyword_hint.empty())
return false;
@@ -236,7 +237,7 @@
return false;
}
- keyword->assign(keyword_hint);
+ keyword->assign(UTF16ToWideHack(keyword_hint));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698