Index: webkit/child/weburlloader_impl.cc |
diff --git a/webkit/child/weburlloader_impl.cc b/webkit/child/weburlloader_impl.cc |
index 63ce778da190cc1ab6e217469ad82afdef646bb8..670ab78a17c07e1a65fcc613ee52f820ef2b417f 100644 |
--- a/webkit/child/weburlloader_impl.cc |
+++ b/webkit/child/weburlloader_impl.cc |
@@ -31,6 +31,7 @@ |
#include "webkit/child/ftp_directory_listing_response_delegate.h" |
#include "webkit/child/multipart_response_delegate.h" |
#include "webkit/child/resource_loader_bridge.h" |
+#include "webkit/child/site_isolation_policy.h" |
darin (slow to review)
2013/08/14 05:23:27
We are trying not to add more code to src/webkit/
dsjang
2013/08/14 20:47:03
Done.
|
#include "webkit/child/webkitplatformsupport_impl.h" |
#include "webkit/child/weburlrequest_extradata_impl.h" |
#include "webkit/child/weburlresponse_extradata_impl.h" |
@@ -373,6 +374,13 @@ class WebURLLoaderImpl::Context : public base::RefCounted<Context>, |
scoped_ptr<FtpDirectoryListingResponseDelegate> ftp_listing_delegate_; |
scoped_ptr<MultipartResponseDelegate> multipart_delegate_; |
scoped_ptr<ResourceLoaderBridge> completed_bridge_; |
+ |
+ // TODO(dsjang): A temporary hack to connect the lastest response observed by |
darin (slow to review)
2013/08/14 05:23:27
nit: lastest -> latest
dsjang
2013/08/14 20:47:03
Done.
|
+ // OnReceiveResponse() and the data stream received by OnReceivedData(). We |
+ // can use this information for actual blocking. We can move this to somewhere |
+ // better than here for actual blocking in the renderer. Ultimately, the |
+ // blocking code will be moved to the browser process. |
+ WebURL response_url_; |
}; |
WebURLLoaderImpl::Context::Context(WebURLLoaderImpl* loader) |
@@ -668,6 +676,8 @@ void WebURLLoaderImpl::Context::OnReceivedResponse( |
ftp_listing_delegate_.reset( |
new FtpDirectoryListingResponseDelegate(client_, loader_, response)); |
} |
+ |
+ response_url_ = response.url(); |
} |
void WebURLLoaderImpl::Context::OnDownloadedData(int len) { |
@@ -692,6 +702,11 @@ void WebURLLoaderImpl::Context::OnReceivedData(const char* data, |
} else { |
client_->didReceiveData(loader_, data, data_length, encoded_data_length); |
} |
+ |
+ // TODO(dsjang): This logging code is just temporary. There has to |
+ // be a better way to connect the received data to the response_url |
+ // than this. |
+ SiteIsolationPolicy::DidReceiveData(data, data_length, response_url_); |
} |
void WebURLLoaderImpl::Context::OnReceivedCachedMetadata( |
@@ -727,6 +742,11 @@ void WebURLLoaderImpl::Context::OnCompletedRequest( |
} |
} |
+ // TODO(dsjang): This logging code is just temporary. There has to |
+ // be a better way to connect the received data to the response_url |
+ // than this. |
+ SiteIsolationPolicy::DidFinishResourceLoadForUrl(response_url_); |
+ |
// We are done with the bridge now, and so we need to release the reference |
// to ourselves that we took on behalf of the bridge. This may cause our |
// destruction. |