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

Unified Diff: third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.h

Issue 2768063003: Move files in wtf/ to platform/wtf/ (Part 11). (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
Index: third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.h
diff --git a/third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.h b/third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.h
index e253e2157b42096f69829c294d594403f92ffa3c..7632b27fd84d3e463e605bb72295daec7d5e2b6f 100644
--- a/third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.h
+++ b/third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.h
@@ -1,57 +1,9 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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 ArrayPiece_h
-#define ArrayPiece_h
+#include "platform/wtf/typed_arrays/ArrayPiece.h"
-#include "wtf/Allocator.h"
-#include "wtf/Forward.h"
-#include "wtf/WTFExport.h"
-
-namespace WTF {
-
-// This class is for passing around un-owned bytes as a pointer + length.
-// It supports implicit conversion from several other data types.
-//
-// ArrayPiece has the concept of being "null". This is different from an empty
-// byte range. It is invalid to call methods other than isNull() on such
-// instances.
-//
-// IMPORTANT: The data contained by ArrayPiece is NOT OWNED, so caution must be
-// taken to ensure it is kept alive.
-class WTF_EXPORT ArrayPiece {
- DISALLOW_NEW();
-
- public:
- // Constructs a "null" ArrayPiece object.
- ArrayPiece();
-
- ArrayPiece(void* data, unsigned byteLength);
-
- // Constructs an ArrayPiece from the given ArrayBuffer. If the input is a
- // nullptr, then the constructed instance will be isNull().
- ArrayPiece(ArrayBuffer*);
- ArrayPiece(ArrayBufferView*);
-
- bool isNull() const;
- void* data() const;
- unsigned char* bytes() const;
- unsigned byteLength() const;
-
- protected:
- void initWithData(void* data, unsigned byteLength);
-
- private:
- void initNull();
-
- void* m_data;
- unsigned m_byteLength;
- bool m_isNull;
-};
-
-} // namespace WTF
-
-using WTF::ArrayPiece;
-
-#endif // ArrayPiece_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

Powered by Google App Engine
This is Rietveld 408576698