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

Unified Diff: chrome/browser/autocomplete/search_provider.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/search_provider.cc
===================================================================
--- chrome/browser/autocomplete/search_provider.cc (revision 71269)
+++ chrome/browser/autocomplete/search_provider.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.
@@ -417,8 +417,8 @@
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 @@
++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 @@
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 @@
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.
« 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