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

Unified Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 2608103002: Remove ScopedVector from URLRequestInterceptorScopedVector. (Closed)
Patch Set: aw Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | blimp/engine/app/blimp_url_request_context_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/net/aw_url_request_context_getter.cc
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc
index 1ea71f31ccb4c84a18eb76dd8e9dd64434c7834e..8b8977beac1f785cb85e31bf9cbd4677559ef1c7 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.cc
+++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -136,10 +136,8 @@ std::unique_ptr<net::URLRequestJobFactory> CreateJobFactory(
// it cannot be used by child processes until access to it is granted via
// ChildProcessSecurityPolicy::GrantScheme(). This is done in
// AwContentBrowserClient.
- request_interceptors.push_back(
- CreateAndroidContentRequestInterceptor().release());
- request_interceptors.push_back(
- CreateAndroidAssetFileRequestInterceptor().release());
+ request_interceptors.push_back(CreateAndroidContentRequestInterceptor());
+ request_interceptors.push_back(CreateAndroidAssetFileRequestInterceptor());
// The AwRequestInterceptor must come after the content and asset file job
// factories. This for WebViewClassic compatibility where it was not
// possible to intercept resource loads to resolvable content:// and
@@ -147,20 +145,18 @@ std::unique_ptr<net::URLRequestJobFactory> CreateJobFactory(
// This logical dependency is also the reason why the Content
// URLRequestInterceptor has to be added as an interceptor rather than as a
// ProtocolHandler.
- request_interceptors.push_back(new AwRequestInterceptor());
+ request_interceptors.push_back(base::MakeUnique<AwRequestInterceptor>());
// The chain of responsibility will execute the handlers in reverse to the
// order in which the elements of the chain are created.
std::unique_ptr<net::URLRequestJobFactory> job_factory(
std::move(aw_job_factory));
- for (content::URLRequestInterceptorScopedVector::reverse_iterator i =
- request_interceptors.rbegin();
- i != request_interceptors.rend();
+ for (auto i = request_interceptors.rbegin(); i != request_interceptors.rend();
++i) {
job_factory.reset(new net::URLRequestInterceptingJobFactory(
- std::move(job_factory), base::WrapUnique(*i)));
+ std::move(job_factory), std::move(*i)));
}
- request_interceptors.weak_clear();
+ request_interceptors.clear();
return job_factory;
}
« no previous file with comments | « no previous file | blimp/engine/app/blimp_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698