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

Unified Diff: net/base/elements_upload_data_stream.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « net/base/dns_util_unittest.cc ('k') | net/base/elements_upload_data_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/elements_upload_data_stream.h
diff --git a/net/base/elements_upload_data_stream.h b/net/base/elements_upload_data_stream.h
deleted file mode 100644
index 5101114a3cca213ba193a906182d74a12121d036..0000000000000000000000000000000000000000
--- a/net/base/elements_upload_data_stream.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2012 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 NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_
-#define NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_
-
-#include "base/basictypes.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
-#include "base/memory/weak_ptr.h"
-#include "net/base/net_export.h"
-#include "net/base/upload_data_stream.h"
-
-namespace net {
-
-class DrainableIOBuffer;
-class IOBuffer;
-class UploadElementReader;
-
-// A non-chunked UploadDataStream consisting of one or more UploadElements.
-class NET_EXPORT ElementsUploadDataStream : public UploadDataStream {
- public:
- ElementsUploadDataStream(ScopedVector<UploadElementReader> element_readers,
- int64 identifier);
-
- ~ElementsUploadDataStream() override;
-
- // Creates an ElementsUploadDataStream with a single reader. Returns a
- // scoped_ptr<UploadDataStream> for ease of use.
- static scoped_ptr<UploadDataStream> CreateWithReader(
- scoped_ptr<UploadElementReader> reader,
- int64 identifier);
-
- private:
- // UploadDataStream implementation.
- bool IsInMemory() const override;
- const ScopedVector<UploadElementReader>* GetElementReaders() const override;
- int InitInternal() override;
- int ReadInternal(IOBuffer* buf, int buf_len) override;
- void ResetInternal() override;
-
- // Runs Init() for all element readers.
- // This method is used to implement InitInternal().
- int InitElements(size_t start_index);
-
- // Called when the |index| element finishes initialization. If it succeeded,
- // continues with the |index + 1| element. Calls OnInitCompleted on error or
- // when all elements have been initialized.
- void OnInitElementCompleted(size_t index, int result);
-
- // Reads data from the element readers.
- // This method is used to implement Read().
- int ReadElements(const scoped_refptr<DrainableIOBuffer>& buf);
-
- // Resumes pending read and calls OnReadCompleted with a result when
- // necessary.
- void OnReadElementCompleted(const scoped_refptr<DrainableIOBuffer>& buf,
- int result);
-
- // Processes result of UploadElementReader::Read(). If |result| indicates
- // success, updates |buf|'s offset. Otherwise, sets |read_failed_| to true.
- void ProcessReadResult(const scoped_refptr<DrainableIOBuffer>& buf,
- int result);
-
- ScopedVector<UploadElementReader> element_readers_;
-
- // Index of the current upload element (i.e. the element currently being
- // read). The index is used as a cursor to iterate over elements in
- // |upload_data_|.
- size_t element_index_;
-
- // True if an error occcured during read operation.
- bool read_failed_;
-
- base::WeakPtrFactory<ElementsUploadDataStream> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ElementsUploadDataStream);
-};
-
-} // namespace net
-
-#endif // NET_BASE_ELEMENTS_UPLOAD_DATA_STREAM_H_
« no previous file with comments | « net/base/dns_util_unittest.cc ('k') | net/base/elements_upload_data_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698