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

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

Issue 2764243002: Move files in wtf/ to platform/wtf/ (Part 9). (Closed)
Patch Set: Rebase. Created 3 years, 9 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 | « third_party/WebKit/Source/wtf/text/StringView.cpp ('k') | third_party/WebKit/Source/wtf/text/UTF8.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb2af936e3bcd97fa49cf413baf2a61b81f2e456..aa861b96e2439015c9d0c98a435fe82ce97d4d58 100644
--- a/third_party/WebKit/Source/wtf/text/UTF8.h
+++ b/third_party/WebKit/Source/wtf/text/UTF8.h
@@ -1,92 +1,9 @@
-/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
-#ifndef WTF_UTF8_h
-#define WTF_UTF8_h
+#include "platform/wtf/text/UTF8.h"
-#include "wtf/WTFExport.h"
-#include "wtf/text/Unicode.h"
-
-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;
-
-// 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 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 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);
-
-} // namespace Unicode
-} // namespace WTF
-
-#endif // WTF_UTF8_h
+// The contents of this header was moved to platform/wtf as part of
+// WTF migration project. See the following post for details:
+// https://groups.google.com/a/chromium.org/d/msg/blink-dev/tLdAZCTlcAA/bYXVT8gYCAAJ
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringView.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