Project import generated by Copybara.
PiperOrigin-RevId: 229942388
Change-Id: Ib5a23c152c95ed4294cece9f902227c21ce531ef
diff --git a/spdy/core/array_output_buffer.cc b/spdy/core/array_output_buffer.cc
new file mode 100644
index 0000000..ea82eb0
--- /dev/null
+++ b/spdy/core/array_output_buffer.cc
@@ -0,0 +1,23 @@
+// 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.
+
+#include "net/third_party/quiche/src/spdy/core/array_output_buffer.h"
+
+namespace spdy {
+
+void ArrayOutputBuffer::Next(char** data, int* size) {
+ *data = current_;
+ *size = capacity_ > 0 ? capacity_ : 0;
+}
+
+void ArrayOutputBuffer::AdvanceWritePtr(int64_t count) {
+ current_ += count;
+ capacity_ -= count;
+}
+
+uint64_t ArrayOutputBuffer::BytesFree() const {
+ return capacity_;
+}
+
+} // namespace spdy