| Index: android_webview/native/android_protocol_handler.cc
|
| diff --git a/android_webview/native/android_protocol_handler.cc b/android_webview/native/android_protocol_handler.cc
|
| index a04e5d91bdabd72c054e362101c5f7d80786d8d8..e7edb5d8e5512f15c89aa1baae7a7ce127921fb0 100644
|
| --- a/android_webview/native/android_protocol_handler.cc
|
| +++ b/android_webview/native/android_protocol_handler.cc
|
| @@ -14,6 +14,7 @@
|
| #include "base/android/jni_android.h"
|
| #include "base/android/jni_string.h"
|
| #include "base/android/jni_weak_ref.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "content/public/common/url_constants.h"
|
| #include "jni/AndroidProtocolHandler_jni.h"
|
| #include "net/base/io_buffer.h"
|
| @@ -63,8 +64,8 @@ class AndroidStreamReaderURLRequestJobDelegateImpl
|
| public:
|
| AndroidStreamReaderURLRequestJobDelegateImpl();
|
|
|
| - scoped_ptr<InputStream> OpenInputStream(JNIEnv* env,
|
| - const GURL& url) override;
|
| + std::unique_ptr<InputStream> OpenInputStream(JNIEnv* env,
|
| + const GURL& url) override;
|
|
|
| void OnInputStreamOpenFailed(net::URLRequest* request,
|
| bool* restart) override;
|
| @@ -127,9 +128,9 @@ AndroidStreamReaderURLRequestJobDelegateImpl::
|
| ~AndroidStreamReaderURLRequestJobDelegateImpl() {
|
| }
|
|
|
| -scoped_ptr<InputStream>
|
| -AndroidStreamReaderURLRequestJobDelegateImpl::OpenInputStream(
|
| - JNIEnv* env, const GURL& url) {
|
| +std::unique_ptr<InputStream>
|
| +AndroidStreamReaderURLRequestJobDelegateImpl::OpenInputStream(JNIEnv* env,
|
| + const GURL& url) {
|
| DCHECK(url.is_valid());
|
| DCHECK(env);
|
|
|
| @@ -144,9 +145,9 @@ AndroidStreamReaderURLRequestJobDelegateImpl::OpenInputStream(
|
|
|
| if (stream.is_null()) {
|
| DLOG(ERROR) << "Unable to open input stream for Android URL";
|
| - return scoped_ptr<InputStream>();
|
| + return std::unique_ptr<InputStream>();
|
| }
|
| - return make_scoped_ptr<InputStream>(new InputStreamImpl(stream));
|
| + return base::WrapUnique(new InputStreamImpl(stream));
|
| }
|
|
|
| void AndroidStreamReaderURLRequestJobDelegateImpl::OnInputStreamOpenFailed(
|
| @@ -220,7 +221,7 @@ net::URLRequestJob* AndroidRequestInterceptorBase::MaybeInterceptRequest(
|
| if (HasRequestPreviouslyFailed(request))
|
| return NULL;
|
|
|
| - scoped_ptr<AndroidStreamReaderURLRequestJobDelegateImpl> reader_delegate(
|
| + std::unique_ptr<AndroidStreamReaderURLRequestJobDelegateImpl> reader_delegate(
|
| new AndroidStreamReaderURLRequestJobDelegateImpl());
|
|
|
| return new AndroidStreamReaderURLRequestJob(request, network_delegate,
|
| @@ -256,15 +257,15 @@ bool RegisterAndroidProtocolHandler(JNIEnv* env) {
|
| }
|
|
|
| // static
|
| -scoped_ptr<net::URLRequestInterceptor>
|
| +std::unique_ptr<net::URLRequestInterceptor>
|
| CreateContentSchemeRequestInterceptor() {
|
| - return make_scoped_ptr<net::URLRequestInterceptor>(
|
| - new ContentSchemeRequestInterceptor());
|
| + return base::WrapUnique(new ContentSchemeRequestInterceptor());
|
| }
|
|
|
| // static
|
| -scoped_ptr<net::URLRequestInterceptor> CreateAssetFileRequestInterceptor() {
|
| - return scoped_ptr<net::URLRequestInterceptor>(
|
| +std::unique_ptr<net::URLRequestInterceptor>
|
| +CreateAssetFileRequestInterceptor() {
|
| + return std::unique_ptr<net::URLRequestInterceptor>(
|
| new AssetFileRequestInterceptor());
|
| }
|
|
|
|
|