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

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

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.cpp
diff --git a/third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.cpp b/third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.cpp
deleted file mode 100644
index 27a3bc92891a7a6bed08fd00ef04dc1c8b06825a..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 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.
-
-#include "wtf/typed_arrays/ArrayPiece.h"
-
-#include "wtf/Assertions.h"
-#include "wtf/typed_arrays/ArrayBuffer.h"
-#include "wtf/typed_arrays/ArrayBufferView.h"
-
-namespace WTF {
-
-ArrayPiece::ArrayPiece() {
- initNull();
-}
-
-ArrayPiece::ArrayPiece(void* data, unsigned byteLength) {
- initWithData(data, byteLength);
-}
-
-ArrayPiece::ArrayPiece(ArrayBuffer* buffer) {
- if (buffer) {
- initWithData(buffer->data(), buffer->byteLength());
- } else {
- initNull();
- }
-}
-
-ArrayPiece::ArrayPiece(ArrayBufferView* buffer) {
- if (buffer) {
- initWithData(buffer->baseAddress(), buffer->byteLength());
- } else {
- initNull();
- }
-}
-
-bool ArrayPiece::isNull() const {
- return m_isNull;
-}
-
-void* ArrayPiece::data() const {
- DCHECK(!isNull());
- return m_data;
-}
-
-unsigned char* ArrayPiece::bytes() const {
- return static_cast<unsigned char*>(data());
-}
-
-unsigned ArrayPiece::byteLength() const {
- DCHECK(!isNull());
- return m_byteLength;
-}
-
-void ArrayPiece::initWithData(void* data, unsigned byteLength) {
- m_byteLength = byteLength;
- m_data = data;
- m_isNull = false;
-}
-
-void ArrayPiece::initNull() {
- m_byteLength = 0;
- m_data = 0;
- m_isNull = true;
-}
-
-} // namespace WTF
« no previous file with comments | « third_party/WebKit/Source/wtf/typed_arrays/ArrayPiece.h ('k') | third_party/WebKit/Source/wtf/typed_arrays/Float32Array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698