| Index: ios/net/crn_http_protocol_handler.mm
|
| diff --git a/ios/net/crn_http_protocol_handler.mm b/ios/net/crn_http_protocol_handler.mm
|
| index ba7ca57d87cfbeb476021f16356e73516eec6450..05609b0740a9b48457023735937cad38c1ed231d 100644
|
| --- a/ios/net/crn_http_protocol_handler.mm
|
| +++ b/ios/net/crn_http_protocol_handler.mm
|
| @@ -4,11 +4,14 @@
|
|
|
| #import "ios/net/crn_http_protocol_handler.h"
|
|
|
| +#include <vector>
|
| +
|
| #include "base/command_line.h"
|
| #include "base/logging.h"
|
| #include "base/mac/bind_objc_block.h"
|
| #include "base/mac/scoped_nsobject.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| @@ -193,7 +196,7 @@ class HttpProtocolHandlerCore
|
| // Stream delegate to read the HTTPBodyStream.
|
| base::scoped_nsobject<CRWHTTPStreamDelegate> stream_delegate_;
|
| // Vector of readers used to accumulate a POST data stream.
|
| - ScopedVector<UploadElementReader> post_data_readers_;
|
| + std::vector<scoped_ptr<UploadElementReader>> post_data_readers_;
|
|
|
| // This cannot be a scoped pointer because it must be deleted on the IO
|
| // thread.
|
| @@ -238,7 +241,7 @@ void HttpProtocolHandlerCore::HandleStreamEvent(NSStream* stream,
|
| // NOTE: This call will result in |post_data_readers_| being cleared,
|
| // which is the desired behavior.
|
| net_request_->set_upload(make_scoped_ptr(
|
| - new ElementsUploadDataStream(post_data_readers_.Pass(), 0)));
|
| + new ElementsUploadDataStream(std::move(post_data_readers_), 0)));
|
| DCHECK(post_data_readers_.empty());
|
| }
|
| net_request_->Start();
|
| @@ -253,7 +256,7 @@ void HttpProtocolHandlerCore::HandleStreamEvent(NSStream* stream,
|
| if (length) {
|
| std::vector<char> owned_data(buffer_->data(), buffer_->data() + length);
|
| post_data_readers_.push_back(
|
| - new UploadOwnedBytesElementReader(&owned_data));
|
| + make_scoped_ptr(new UploadOwnedBytesElementReader(&owned_data)));
|
| }
|
| break;
|
| }
|
|
|