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

Unified Diff: chrome/browser/autocomplete/search_provider.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/autocomplete/search_provider.cc
===================================================================
--- chrome/browser/autocomplete/search_provider.cc (revision 71499)
+++ chrome/browser/autocomplete/search_provider.cc (working copy)
@@ -417,8 +417,8 @@
DCHECK(suggestions_url->SupportsReplacement());
URLFetcher* fetcher = URLFetcher::Create(id,
GURL(suggestions_url->ReplaceSearchTerms(
- provider, WideToUTF16Hack(text),
- TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16())),
+ provider, text, TemplateURLRef::NO_SUGGESTIONS_AVAILABLE,
+ std::wstring())),
URLFetcher::GET, this);
fetcher->set_request_context(profile_->GetRequestContext());
fetcher->Start();
@@ -778,8 +778,7 @@
++search_start;
}
if (is_keyword) {
- match.fill_into_edit.append(UTF16ToWideHack(
- providers_.keyword_provider().keyword() + char16(' ')));
+ match.fill_into_edit.append(providers_.keyword_provider().keyword() + L" ");
match.template_url = &providers_.keyword_provider();
}
match.fill_into_edit.append(query_string);
@@ -793,9 +792,9 @@
DCHECK(search_url->SupportsReplacement());
match.destination_url =
GURL(search_url->ReplaceSearchTerms(provider,
- WideToUTF16Hack(query_string),
+ query_string,
accepted_suggestion,
- WideToUTF16Hack(input_text)));
+ input_text));
// Search results don't look like URLs.
match.transition =
@@ -873,8 +872,8 @@
match.description.assign(
UTF16ToWideHack(l10n_util::GetStringFUTF16(
IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION,
- providers_.default_provider().
- AdjustedShortNameForLocaleDirection())));
+ WideToUTF16Hack(providers_.default_provider().
+ AdjustedShortNameForLocaleDirection()))));
match.description_class.push_back(
ACMatchClassification(0, ACMatchClassification::DIM));
// Only the first search match gets a description.
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider_unittest.cc ('k') | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698