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

Unified Diff: webkit/child/weburlloader_impl.cc

Issue 22254005: UMA data collector for cross-site documents(XSD) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Merge lkgr into local branch Created 7 years, 4 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: webkit/child/weburlloader_impl.cc
diff --git a/webkit/child/weburlloader_impl.cc b/webkit/child/weburlloader_impl.cc
index 63ce778da190cc1ab6e217469ad82afdef646bb8..602dc45c06bc6fd1515abafbc3d55ff56c7602e8 100644
--- a/webkit/child/weburlloader_impl.cc
+++ b/webkit/child/weburlloader_impl.cc
@@ -31,11 +31,13 @@
#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"
#include "webkit/child/webkitplatformsupport_impl.h"
#include "webkit/child/weburlrequest_extradata_impl.h"
#include "webkit/child/weburlresponse_extradata_impl.h"
#include "webkit/common/resource_request_body.h"
+
Charlie Reis 2013/08/13 00:53:19 There are still a few unresolved comments about th
using base::Time;
using base::TimeTicks;
using WebKit::WebData;
@@ -373,6 +375,11 @@ 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 OnReceiveResponse() and the data stream received by
+ // OnReceivedData().
+ WebURL response_url_;
};
WebURLLoaderImpl::Context::Context(WebURLLoaderImpl* loader)
@@ -668,6 +675,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 +701,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 +741,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.

Powered by Google App Engine
This is Rietveld 408576698