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

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

Issue 1150943002: Subsituting pattern ScopedVector push_back.(ptr.release()) with push_back(ptr.Pass()) in net/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated AUTHERS file with respect of comments Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | 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/elements_upload_data_stream.h" 5 #include "net/base/elements_upload_data_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 13 matching lines...) Expand all
24 weak_ptr_factory_(this) { 24 weak_ptr_factory_(this) {
25 } 25 }
26 26
27 ElementsUploadDataStream::~ElementsUploadDataStream() { 27 ElementsUploadDataStream::~ElementsUploadDataStream() {
28 } 28 }
29 29
30 scoped_ptr<UploadDataStream> ElementsUploadDataStream::CreateWithReader( 30 scoped_ptr<UploadDataStream> ElementsUploadDataStream::CreateWithReader(
31 scoped_ptr<UploadElementReader> reader, 31 scoped_ptr<UploadElementReader> reader,
32 int64 identifier) { 32 int64 identifier) {
33 ScopedVector<UploadElementReader> readers; 33 ScopedVector<UploadElementReader> readers;
34 readers.push_back(reader.release()); 34 readers.push_back(reader.Pass());
35 return scoped_ptr<UploadDataStream>( 35 return scoped_ptr<UploadDataStream>(
36 new ElementsUploadDataStream(readers.Pass(), identifier)); 36 new ElementsUploadDataStream(readers.Pass(), identifier));
37 } 37 }
38 38
39 int ElementsUploadDataStream::InitInternal() { 39 int ElementsUploadDataStream::InitInternal() {
40 return InitElements(0); 40 return InitElements(0);
41 } 41 }
42 42
43 int ElementsUploadDataStream::ReadInternal( 43 int ElementsUploadDataStream::ReadInternal(
44 IOBuffer* buf, 44 IOBuffer* buf,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 DCHECK(!read_failed_); 157 DCHECK(!read_failed_);
158 158
159 if (result >= 0) { 159 if (result >= 0) {
160 buf->DidConsume(result); 160 buf->DidConsume(result);
161 } else { 161 } else {
162 read_failed_ = true; 162 read_failed_ = true;
163 } 163 }
164 } 164 }
165 165
166 } // namespace net 166 } // namespace net
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698