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

Unified Diff: base/utf_string_conversions.h

Issue 6317016: Change UTF8ToUTF16 to accept const StringPiece&. (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
« no previous file with comments | « no previous file | base/utf_string_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/utf_string_conversions.h
diff --git a/base/utf_string_conversions.h b/base/utf_string_conversions.h
index 6c49b41148c3846c23438029d0e861f13b4609c1..b9242f60eb14e2b27a2bbc0e11d34721d0622c32 100644
--- a/base/utf_string_conversions.h
+++ b/base/utf_string_conversions.h
@@ -9,10 +9,7 @@
#include <string>
#include "base/string16.h"
-
-namespace base {
-class StringPiece;
-}
+#include "base/string_piece.h"
Avi (use Gerrit) 2011/01/26 21:58:55 Why? We don't need it for the declaration in this
James Su 2011/01/26 22:13:30 But from string_piece.h: // Functions or methods
// These convert between UTF-8, -16, and -32 strings. They are potentially slow,
// so avoid unnecessary conversions. The low-level versions return a boolean
@@ -31,7 +28,7 @@ bool UTF16ToWide(const char16* src, size_t src_len, std::wstring* output);
std::wstring UTF16ToWide(const string16& utf16);
bool UTF8ToUTF16(const char* src, size_t src_len, string16* output);
-string16 UTF8ToUTF16(const std::string& utf8);
+string16 UTF8ToUTF16(const base::StringPiece& utf8);
bool UTF16ToUTF8(const char16* src, size_t src_len, std::string* output);
std::string UTF16ToUTF8(const string16& utf16);
« no previous file with comments | « no previous file | base/utf_string_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698