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

Side by Side Diff: base/i18n/case_conversion.cc

Issue 7549003: Optimize phishing page term feature extraction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compile errors. Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/i18n/case_conversion.h" 5 #include "base/i18n/case_conversion.h"
6 6
7 #include "unicode/unistr.h" 7 #include "unicode/unistr.h"
8 8
9 namespace base { 9 namespace base {
10 namespace i18n { 10 namespace i18n {
11 11
12 string16 ToLower(const string16& string) { 12 string16 ToLower(const WideStringPiece& string) {
13 icu::UnicodeString unicode_string(string.c_str(), string.size()); 13 icu::UnicodeString unicode_string(string.data(), string.size());
14 unicode_string.toLower(); 14 unicode_string.toLower();
15 return string16(unicode_string.getBuffer(), unicode_string.length()); 15 return string16(unicode_string.getBuffer(), unicode_string.length());
16 } 16 }
17 17
18 string16 ToUpper(const string16& string) { 18 string16 ToUpper(const WideStringPiece& string) {
19 icu::UnicodeString unicode_string(string.c_str(), string.size()); 19 icu::UnicodeString unicode_string(string.data(), string.size());
20 unicode_string.toUpper(); 20 unicode_string.toUpper();
21 return string16(unicode_string.getBuffer(), unicode_string.length()); 21 return string16(unicode_string.getBuffer(), unicode_string.length());
22 } 22 }
23 23
24 } // namespace i18n 24 } // namespace i18n
25 } // namespace base 25 } // namespace base
OLDNEW
« no previous file with comments | « base/i18n/case_conversion.h ('k') | base/memory/mru_cache.h » ('j') | base/memory/mru_cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698