| Index: webrtc/base/httpclient.cc
|
| diff --git a/webrtc/base/httpclient.cc b/webrtc/base/httpclient.cc
|
| index e078334094a47409e90f2dc72ddb4ee679dde254..a458590bdb6406adc1509700cbd7092f897ae0b2 100644
|
| --- a/webrtc/base/httpclient.cc
|
| +++ b/webrtc/base/httpclient.cc
|
| @@ -10,6 +10,7 @@
|
|
|
| #include <time.h>
|
| #include <algorithm>
|
| +#include <memory>
|
| #include "webrtc/base/asyncsocket.h"
|
| #include "webrtc/base/common.h"
|
| #include "webrtc/base/diskcache.h"
|
| @@ -17,7 +18,6 @@
|
| #include "webrtc/base/httpcommon-inl.h"
|
| #include "webrtc/base/logging.h"
|
| #include "webrtc/base/pathutils.h"
|
| -#include "webrtc/base/scoped_ptr.h"
|
| #include "webrtc/base/socketstream.h"
|
| #include "webrtc/base/stringencode.h"
|
| #include "webrtc/base/stringutils.h"
|
| @@ -466,7 +466,8 @@ bool HttpClient::BeginCacheFile() {
|
| return false;
|
| }
|
|
|
| - scoped_ptr<StreamInterface> stream(cache_->WriteResource(id, kCacheBody));
|
| + std::unique_ptr<StreamInterface> stream(
|
| + cache_->WriteResource(id, kCacheBody));
|
| if (!stream) {
|
| LOG_F(LS_ERROR) << "Couldn't open body cache";
|
| return false;
|
| @@ -485,7 +486,8 @@ bool HttpClient::BeginCacheFile() {
|
| }
|
|
|
| HttpError HttpClient::WriteCacheHeaders(const std::string& id) {
|
| - scoped_ptr<StreamInterface> stream(cache_->WriteResource(id, kCacheHeader));
|
| + std::unique_ptr<StreamInterface> stream(
|
| + cache_->WriteResource(id, kCacheHeader));
|
| if (!stream) {
|
| LOG_F(LS_ERROR) << "Couldn't open header cache";
|
| return HE_CACHE;
|
| @@ -563,7 +565,8 @@ bool HttpClient::CheckCache() {
|
| }
|
|
|
| HttpError HttpClient::ReadCacheHeaders(const std::string& id, bool override) {
|
| - scoped_ptr<StreamInterface> stream(cache_->ReadResource(id, kCacheHeader));
|
| + std::unique_ptr<StreamInterface> stream(
|
| + cache_->ReadResource(id, kCacheHeader));
|
| if (!stream) {
|
| return HE_CACHE;
|
| }
|
| @@ -586,7 +589,7 @@ HttpError HttpClient::ReadCacheBody(const std::string& id) {
|
| HttpError error = HE_NONE;
|
|
|
| size_t data_size;
|
| - scoped_ptr<StreamInterface> stream(cache_->ReadResource(id, kCacheBody));
|
| + std::unique_ptr<StreamInterface> stream(cache_->ReadResource(id, kCacheBody));
|
| if (!stream || !stream->GetAvailable(&data_size)) {
|
| LOG_F(LS_ERROR) << "Unavailable cache body";
|
| error = HE_CACHE;
|
| @@ -599,7 +602,7 @@ HttpError HttpClient::ReadCacheBody(const std::string& id) {
|
| && response().document) {
|
| // Allocate on heap to not explode the stack.
|
| const int array_size = 1024 * 64;
|
| - scoped_ptr<char[]> buffer(new char[array_size]);
|
| + std::unique_ptr<char[]> buffer(new char[array_size]);
|
| StreamResult result = Flow(stream.get(), buffer.get(), array_size,
|
| response().document.get());
|
| if (SR_SUCCESS != result) {
|
|
|