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

Unified Diff: third_party/WebKit/Source/wtf/text/StringUTF8Adaptor.h

Issue 2373983006: reflow comments in wtf/text (Closed)
Patch Set: Created 4 years, 3 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: third_party/WebKit/Source/wtf/text/StringUTF8Adaptor.h
diff --git a/third_party/WebKit/Source/wtf/text/StringUTF8Adaptor.h b/third_party/WebKit/Source/wtf/text/StringUTF8Adaptor.h
index 4e5809008ba6f8425b9e9fce0957ff8c167b18d8..9eeb3bacea8a7aab1a081fe3662c107a03e983a8 100644
--- a/third_party/WebKit/Source/wtf/text/StringUTF8Adaptor.h
+++ b/third_party/WebKit/Source/wtf/text/StringUTF8Adaptor.h
@@ -49,10 +49,10 @@ class StringUTF8Adaptor final {
explicit StringUTF8Adaptor(const String& string) : m_data(0), m_length(0) {
if (string.isEmpty())
return;
- // Unfortunately, 8 bit WTFStrings are encoded in Latin-1 and GURL uses UTF-8
- // when processing 8 bit strings. If |relative| is entirely ASCII, we luck out
- // and can avoid mallocing a new buffer to hold the UTF-8 data because UTF-8
- // and Latin-1 use the same code units for ASCII code points.
+ // Unfortunately, 8 bit WTFStrings are encoded in Latin-1 and GURL uses
+ // UTF-8 when processing 8 bit strings. If |relative| is entirely ASCII, we
+ // luck out and can avoid mallocing a new buffer to hold the UTF-8 data
+ // because UTF-8 and Latin-1 use the same code units for ASCII code points.
if (string.is8Bit() && string.containsOnlyASCII()) {
m_data = reinterpret_cast<const char*>(string.characters8());
m_length = string.length();

Powered by Google App Engine
This is Rietveld 408576698