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

Unified Diff: android_webview/browser/aw_request_interceptor.cc

Issue 284123004: [android_webview] Add more params to request intercepting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix accidentally broken test Created 6 years, 6 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
Index: android_webview/browser/aw_request_interceptor.cc
diff --git a/android_webview/browser/aw_request_interceptor.cc b/android_webview/browser/aw_request_interceptor.cc
index a53061b684b31ec6cc9c8e4cc768959867553348..381a8ab03cdad3657424de878920657fd72bb17a 100644
--- a/android_webview/browser/aw_request_interceptor.cc
+++ b/android_webview/browser/aw_request_interceptor.cc
@@ -5,7 +5,7 @@
#include "android_webview/browser/aw_request_interceptor.h"
#include "android_webview/browser/aw_contents_io_thread_client.h"
-#include "android_webview/browser/intercepted_request_data.h"
+#include "android_webview/browser/aw_web_resource_response.h"
#include "base/android/jni_string.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/browser_thread.h"
@@ -34,21 +34,21 @@ AwRequestInterceptor::AwRequestInterceptor() {
AwRequestInterceptor::~AwRequestInterceptor() {
}
-scoped_ptr<InterceptedRequestData>
-AwRequestInterceptor::QueryForInterceptedRequestData(
+scoped_ptr<AwWebResourceResponse>
+AwRequestInterceptor::QueryForAwWebResourceResponse(
const GURL& location,
net::URLRequest* request) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
int render_process_id, render_frame_id;
if (!ResourceRequestInfo::GetRenderFrameForRequest(
request, &render_process_id, &render_frame_id))
- return scoped_ptr<InterceptedRequestData>();
+ return scoped_ptr<AwWebResourceResponse>();
scoped_ptr<AwContentsIoThreadClient> io_thread_client =
AwContentsIoThreadClient::FromID(render_process_id, render_frame_id);
if (!io_thread_client.get())
- return scoped_ptr<InterceptedRequestData>();
+ return scoped_ptr<AwWebResourceResponse>();
return io_thread_client->ShouldInterceptRequest(location, request).Pass();
}
@@ -58,7 +58,7 @@ net::URLRequestJob* AwRequestInterceptor::MaybeInterceptRequest(
net::NetworkDelegate* network_delegate) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- // See if we've already found out the intercepted_request_data for this
+ // See if we've already found out the aw_web_resource_response for this
// request.
// This is done not only for efficiency reasons, but also for correctness
// as it is possible for the Interceptor chain to be invoked more than once
@@ -70,15 +70,15 @@ net::URLRequestJob* AwRequestInterceptor::MaybeInterceptRequest(
request->SetUserData(kRequestAlreadyQueriedDataKey,
new base::SupportsUserData::Data());
- scoped_ptr<InterceptedRequestData> intercepted_request_data =
- QueryForInterceptedRequestData(request->url(), request);
+ scoped_ptr<AwWebResourceResponse> aw_web_resource_response =
+ QueryForAwWebResourceResponse(request->url(), request);
- if (!intercepted_request_data)
+ if (!aw_web_resource_response)
return NULL;
- // The newly created job will own the InterceptedRequestData.
- return InterceptedRequestData::CreateJobFor(
- intercepted_request_data.Pass(), request, network_delegate);
+ // The newly created job will own the AwWebResourceResponse.
+ return AwWebResourceResponse::CreateJobFor(
+ aw_web_resource_response.Pass(), request, network_delegate);
}
} // namespace android_webview
« no previous file with comments | « android_webview/browser/aw_request_interceptor.h ('k') | android_webview/browser/aw_web_resource_response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698