summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/search_provider.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 21:15:35 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 21:15:35 +0000
commita61c5c9bb6524d77c30b6a18f542c0e4616ee7bc (patch)
treec1afa473cffdaea857f181ba0788e60212649f30 /chrome/browser/autocomplete/search_provider.cc
parent0eb90137036cf765397a69f04f5c6695679fd8c0 (diff)
downloadchromium_src-a61c5c9bb6524d77c30b6a18f542c0e4616ee7bc.zip
chromium_src-a61c5c9bb6524d77c30b6a18f542c0e4616ee7bc.tar.gz
chromium_src-a61c5c9bb6524d77c30b6a18f542c0e4616ee7bc.tar.bz2
Remove wstring from TemplateURL and friends.
BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6322001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/search_provider.cc')
-rw-r--r--chrome/browser/autocomplete/search_provider.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index 2b308a3..fa162d3 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -417,8 +417,8 @@ URLFetcher* SearchProvider::CreateSuggestFetcher(int id,
DCHECK(suggestions_url->SupportsReplacement());
URLFetcher* fetcher = URLFetcher::Create(id,
GURL(suggestions_url->ReplaceSearchTerms(
- provider, text, TemplateURLRef::NO_SUGGESTIONS_AVAILABLE,
- std::wstring())),
+ provider, WideToUTF16Hack(text),
+ TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16())),
URLFetcher::GET, this);
fetcher->set_request_context(profile_->GetRequestContext());
fetcher->Start();
@@ -778,7 +778,8 @@ void SearchProvider::AddMatchToMap(const std::wstring& query_string,
++search_start;
}
if (is_keyword) {
- match.fill_into_edit.append(providers_.keyword_provider().keyword() + L" ");
+ match.fill_into_edit.append(UTF16ToWideHack(
+ providers_.keyword_provider().keyword() + char16(' ')));
match.template_url = &providers_.keyword_provider();
}
match.fill_into_edit.append(query_string);
@@ -792,9 +793,9 @@ void SearchProvider::AddMatchToMap(const std::wstring& query_string,
DCHECK(search_url->SupportsReplacement());
match.destination_url =
GURL(search_url->ReplaceSearchTerms(provider,
- query_string,
+ WideToUTF16Hack(query_string),
accepted_suggestion,
- input_text));
+ WideToUTF16Hack(input_text)));
// Search results don't look like URLs.
match.transition =
@@ -872,8 +873,8 @@ void SearchProvider::UpdateFirstSearchMatchDescription() {
match.description.assign(
UTF16ToWideHack(l10n_util::GetStringFUTF16(
IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION,
- WideToUTF16Hack(providers_.default_provider().
- AdjustedShortNameForLocaleDirection()))));
+ providers_.default_provider().
+ AdjustedShortNameForLocaleDirection())));
match.description_class.push_back(
ACMatchClassification(0, ACMatchClassification::DIM));
// Only the first search match gets a description.