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

Side by Side Diff: android_webview/native/android_protocol_handler.cc

Issue 1552723002: Convert Pass()→std::move() in //android_webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « android_webview/browser/test/rendering_test.cc ('k') | android_webview/native/aw_contents.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 "android_webview/native/android_protocol_handler.h" 5 #include "android_webview/native/android_protocol_handler.h"
6 6
7 #include <utility>
8
7 #include "android_webview/browser/net/android_stream_reader_url_request_job.h" 9 #include "android_webview/browser/net/android_stream_reader_url_request_job.h"
8 #include "android_webview/browser/net/aw_url_request_job_factory.h" 10 #include "android_webview/browser/net/aw_url_request_job_factory.h"
9 #include "android_webview/common/url_constants.h" 11 #include "android_webview/common/url_constants.h"
10 #include "android_webview/native/input_stream_impl.h" 12 #include "android_webview/native/input_stream_impl.h"
11 #include "base/android/context_utils.h" 13 #include "base/android/context_utils.h"
12 #include "base/android/jni_android.h" 14 #include "base/android/jni_android.h"
13 #include "base/android/jni_string.h" 15 #include "base/android/jni_string.h"
14 #include "base/android/jni_weak_ref.h" 16 #include "base/android/jni_weak_ref.h"
15 #include "content/public/common/url_constants.h" 17 #include "content/public/common/url_constants.h"
16 #include "jni/AndroidProtocolHandler_jni.h" 18 #include "jni/AndroidProtocolHandler_jni.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Restarting a request involves creating a new job for that request. This 217 // Restarting a request involves creating a new job for that request. This
216 // handler will ignore requests know to have previously failed to 1) prevent 218 // handler will ignore requests know to have previously failed to 1) prevent
217 // an infinite loop, 2) ensure that the next handler in line gets the 219 // an infinite loop, 2) ensure that the next handler in line gets the
218 // opportunity to create a job for the request. 220 // opportunity to create a job for the request.
219 if (HasRequestPreviouslyFailed(request)) 221 if (HasRequestPreviouslyFailed(request))
220 return NULL; 222 return NULL;
221 223
222 scoped_ptr<AndroidStreamReaderURLRequestJobDelegateImpl> reader_delegate( 224 scoped_ptr<AndroidStreamReaderURLRequestJobDelegateImpl> reader_delegate(
223 new AndroidStreamReaderURLRequestJobDelegateImpl()); 225 new AndroidStreamReaderURLRequestJobDelegateImpl());
224 226
225 return new AndroidStreamReaderURLRequestJob( 227 return new AndroidStreamReaderURLRequestJob(request, network_delegate,
226 request, network_delegate, reader_delegate.Pass()); 228 std::move(reader_delegate));
227 } 229 }
228 230
229 // AssetFileRequestInterceptor ------------------------------------------------ 231 // AssetFileRequestInterceptor ------------------------------------------------
230 232
231 AssetFileRequestInterceptor::AssetFileRequestInterceptor() { 233 AssetFileRequestInterceptor::AssetFileRequestInterceptor() {
232 } 234 }
233 235
234 bool AssetFileRequestInterceptor::ShouldHandleRequest( 236 bool AssetFileRequestInterceptor::ShouldHandleRequest(
235 const net::URLRequest* request) const { 237 const net::URLRequest* request) const {
236 return android_webview::IsAndroidSpecialFileUrl(request->url()); 238 return android_webview::IsAndroidSpecialFileUrl(request->url());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return ConvertUTF8ToJavaString(env, android_webview::kAndroidAssetPath); 292 return ConvertUTF8ToJavaString(env, android_webview::kAndroidAssetPath);
291 } 293 }
292 294
293 static ScopedJavaLocalRef<jstring> GetAndroidResourcePath( 295 static ScopedJavaLocalRef<jstring> GetAndroidResourcePath(
294 JNIEnv* env, 296 JNIEnv* env,
295 const JavaParamRef<jclass>& /*clazz*/) { 297 const JavaParamRef<jclass>& /*clazz*/) {
296 return ConvertUTF8ToJavaString(env, android_webview::kAndroidResourcePath); 298 return ConvertUTF8ToJavaString(env, android_webview::kAndroidResourcePath);
297 } 299 }
298 300
299 } // namespace android_webview 301 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/test/rendering_test.cc ('k') | android_webview/native/aw_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698