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

Unified Diff: chrome/browser/autocomplete/autocomplete_match.cc

Issue 6306011: Remove wstring from autocomplete. (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_match.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_match.cc (revision 72388)
+++ chrome/browser/autocomplete/autocomplete_match.cc (working copy)
@@ -12,7 +12,7 @@
: provider(NULL),
relevance(0),
deletable(false),
- inline_autocomplete_offset(std::wstring::npos),
+ inline_autocomplete_offset(string16::npos),
transition(PageTransition::GENERATED),
is_history_what_you_typed_match(false),
type(SEARCH_WHAT_YOU_TYPED),
@@ -27,7 +27,7 @@
: provider(provider),
relevance(relevance),
deletable(deletable),
- inline_autocomplete_offset(std::wstring::npos),
+ inline_autocomplete_offset(string16::npos),
transition(PageTransition::TYPED),
is_history_what_you_typed_match(false),
type(type),
@@ -105,8 +105,8 @@
// static
void AutocompleteMatch::ClassifyMatchInString(
- const std::wstring& find_text,
- const std::wstring& text,
+ const string16& find_text,
+ const string16& text,
int style,
ACMatchClassifications* classification) {
ClassifyLocationInString(text.find(find_text), find_text.length(),
@@ -132,7 +132,7 @@
}
// Mark matching portion of string.
- if (match_location == std::wstring::npos) {
+ if (match_location == string16::npos) {
// No match, above classification will suffice for whole string.
return;
}
@@ -156,7 +156,7 @@
}
void AutocompleteMatch::ValidateClassifications(
- const std::wstring& text,
+ const string16& text,
const ACMatchClassifications& classifications) const {
if (text.empty()) {
DCHECK(classifications.size() == 0);

Powered by Google App Engine
This is Rietveld 408576698