Index: android_webview/browser/net/aw_request_interceptor.cc |
diff --git a/android_webview/browser/net/aw_request_interceptor.cc b/android_webview/browser/net/aw_request_interceptor.cc |
index 3645f2fefe3321da95684c607d2c7f5868e6ed65..acc28f4ac2d8e4e29a1fea2a452fe39071493571 100644 |
--- a/android_webview/browser/net/aw_request_interceptor.cc |
+++ b/android_webview/browser/net/aw_request_interceptor.cc |
@@ -18,6 +18,7 @@ |
#include "content/public/browser/resource_request_info.h" |
#include "net/http/http_response_headers.h" |
#include "net/url_request/url_request_job.h" |
+#include "url/url_constants.h" |
namespace android_webview { |
@@ -119,13 +120,22 @@ std::unique_ptr<AwContentsIoThreadClient> GetCorrespondingIoThreadClient( |
net::URLRequest* request) { |
if (content::ResourceRequestInfo::OriginatedFromServiceWorker(request)) |
return AwContentsIoThreadClient::GetServiceWorkerIoThreadClient(); |
- |
int render_process_id, render_frame_id; |
if (!content::ResourceRequestInfo::GetRenderFrameForRequest( |
request, &render_process_id, &render_frame_id)) { |
return nullptr; |
} |
+ if (render_process_id == -1 || render_frame_id == -1) { |
jam
2017/03/09 22:13:05
since this block (and rest of method) is duplicate
jam
2017/03/10 17:08:44
Ok ignore this comment, I looked through the usage
sgurun-gerrit only
2017/03/10 18:40:58
Acknowledged.
|
+ const content::ResourceRequestInfo* resourceRequestInfo = |
+ content::ResourceRequestInfo::ForRequest(request); |
+ if (resourceRequestInfo == nullptr) { |
+ return nullptr; |
+ } |
+ return AwContentsIoThreadClient::FromID( |
+ resourceRequestInfo->GetFrameTreeNodeId()); |
+ } |
+ |
return AwContentsIoThreadClient::FromID(render_process_id, render_frame_id); |
} |
@@ -144,6 +154,10 @@ net::URLRequestJob* AwRequestInterceptor::MaybeInterceptRequest( |
if (request->GetUserData(kRequestAlreadyHasJobDataKey)) |
return nullptr; |
+ if (request->url().SchemeIs(url::kBlobScheme)) { |
jam
2017/03/09 22:13:05
comment?
sgurun-gerrit only
2017/03/10 18:40:58
Done.
|
+ return nullptr; |
+ } |
+ |
std::unique_ptr<AwContentsIoThreadClient> io_thread_client = |
GetCorrespondingIoThreadClient(request); |