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

Side by Side Diff: net/base/upload_data_stream.cc

Issue 1476443002: Remove ScopedVector from ElementsUploadDataStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 5 years 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 unified diff | Download patch
« no previous file with comments | « net/base/upload_data_stream.h ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/upload_data_stream.h" 5 #include "net/base/upload_data_stream.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 DCHECK(initialized_successfully_); 81 DCHECK(initialized_successfully_);
82 DCHECK(is_chunked_); 82 DCHECK(is_chunked_);
83 DCHECK(!is_eof_); 83 DCHECK(!is_eof_);
84 is_eof_ = true; 84 is_eof_ = true;
85 } 85 }
86 86
87 bool UploadDataStream::IsInMemory() const { 87 bool UploadDataStream::IsInMemory() const {
88 return false; 88 return false;
89 } 89 }
90 90
91 const ScopedVector<UploadElementReader>* 91 const std::vector<scoped_ptr<UploadElementReader>>*
92 UploadDataStream::GetElementReaders() const { 92 UploadDataStream::GetElementReaders() const {
93 return NULL; 93 return NULL;
94 } 94 }
95 95
96 void UploadDataStream::OnInitCompleted(int result) { 96 void UploadDataStream::OnInitCompleted(int result) {
97 DCHECK_NE(ERR_IO_PENDING, result); 97 DCHECK_NE(ERR_IO_PENDING, result);
98 DCHECK(!initialized_successfully_); 98 DCHECK(!initialized_successfully_);
99 DCHECK_EQ(0u, current_position_); 99 DCHECK_EQ(0u, current_position_);
100 DCHECK(!is_eof_); 100 DCHECK(!is_eof_);
101 101
(...skipping 17 matching lines...) Expand all
119 is_eof_ = true; 119 is_eof_ = true;
120 } 120 }
121 121
122 DCHECK(result > 0 || is_eof_); 122 DCHECK(result > 0 || is_eof_);
123 123
124 if (!callback_.is_null()) 124 if (!callback_.is_null())
125 base::ResetAndReturn(&callback_).Run(result); 125 base::ResetAndReturn(&callback_).Run(result);
126 } 126 }
127 127
128 } // namespace net 128 } // namespace net
OLDNEW
« no previous file with comments | « net/base/upload_data_stream.h ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698