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

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

Issue 1373773002: Fix check-webkit-style errors in Source/wtf/text/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/UTF8.h
diff --git a/third_party/WebKit/Source/wtf/text/UTF8.h b/third_party/WebKit/Source/wtf/text/UTF8.h
index b482ba766c88e008add34c0b914454b132e8954f..eda2633409ac290fdf75d8fac637f463ae78ddad 100644
--- a/third_party/WebKit/Source/wtf/text/UTF8.h
+++ b/third_party/WebKit/Source/wtf/text/UTF8.h
@@ -32,43 +32,43 @@
namespace WTF {
namespace Unicode {
- typedef enum {
- conversionOK, // conversion successful
- sourceExhausted, // partial character in source, but hit end
- targetExhausted, // insuff. room in target for conversion
- sourceIllegal // source sequence is illegal/malformed
- } ConversionResult;
+typedef enum {
+ conversionOK, // conversion successful
+ sourceExhausted, // partial character in source, but hit end
+ targetExhausted, // insuff. room in target for conversion
+ sourceIllegal // source sequence is illegal/malformed
+} ConversionResult;
- // These conversion functions take a "strict" argument. When this
- // flag is set to strict, both irregular sequences and isolated surrogates
- // will cause an error. When the flag is set to lenient, both irregular
- // sequences and isolated surrogates are converted.
- //
- // Whether the flag is strict or lenient, all illegal sequences will cause
- // an error return. This includes sequences such as: <F4 90 80 80>, <C0 80>,
- // or <A0> in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code
- // must check for illegal sequences.
- //
- // When the flag is set to lenient, characters over 0x10FFFF are converted
- // to the replacement character; otherwise (when the flag is set to strict)
- // they constitute an error.
+// These conversion functions take a "strict" argument. When this flag is set to
+// strict, both irregular sequences and isolated surrogates will cause an error.
+// When the flag is set to lenient, both irregular sequences and isolated
+// surrogates are converted.
+//
+// Whether the flag is strict or lenient, all illegal sequences will cause an
+// error return. This includes sequences such as: <F4 90 80 80>, <C0 80>, or
+// <A0> in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code must
+// check for illegal sequences.
+//
+// When the flag is set to lenient, characters over 0x10FFFF are converted to
+// the replacement character; otherwise (when the flag is set to strict) they
+// constitute an error.
- WTF_EXPORT ConversionResult convertUTF8ToUTF16(
- const char** sourceStart, const char* sourceEnd,
- UChar** targetStart, UChar* targetEnd, bool* isSourceAllASCII = 0, bool strict = true);
+WTF_EXPORT ConversionResult convertUTF8ToUTF16(
+ const char** sourceStart, const char* sourceEnd,
+ UChar** targetStart, UChar* targetEnd, bool* isSourceAllASCII = 0, bool strict = true);
- WTF_EXPORT ConversionResult convertLatin1ToUTF8(
- const LChar** sourceStart, const LChar* sourceEnd,
- char** targetStart, char* targetEnd);
+WTF_EXPORT ConversionResult convertLatin1ToUTF8(
+ const LChar** sourceStart, const LChar* sourceEnd,
+ char** targetStart, char* targetEnd);
- WTF_EXPORT ConversionResult convertUTF16ToUTF8(
- const UChar** sourceStart, const UChar* sourceEnd,
- char** targetStart, char* targetEnd, bool strict = true);
+WTF_EXPORT ConversionResult convertUTF16ToUTF8(
+ const UChar** sourceStart, const UChar* sourceEnd,
+ char** targetStart, char* targetEnd, bool strict = true);
- WTF_EXPORT unsigned calculateStringHashAndLengthFromUTF8MaskingTop8Bits(const char* data, const char* dataEnd, unsigned& dataLength, unsigned& utf16Length);
+WTF_EXPORT unsigned calculateStringHashAndLengthFromUTF8MaskingTop8Bits(const char* data, const char* dataEnd, unsigned& dataLength, unsigned& utf16Length);
- WTF_EXPORT bool equalUTF16WithUTF8(const UChar* a, const UChar* aEnd, const char* b, const char* bEnd);
- WTF_EXPORT bool equalLatin1WithUTF8(const LChar* a, const LChar* aEnd, const char* b, const char* bEnd);
+WTF_EXPORT bool equalUTF16WithUTF8(const UChar* a, const UChar* aEnd, const char* b, const char* bEnd);
+WTF_EXPORT bool equalLatin1WithUTF8(const LChar* a, const LChar* aEnd, const char* b, const char* bEnd);
} // namespace Unicode
} // namespace WTF
« no previous file with comments | « third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp ('k') | third_party/WebKit/Source/wtf/text/UTF8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698