| Index: chrome/renderer/security_filter_peer.cc
|
| diff --git a/chrome/renderer/security_filter_peer.cc b/chrome/renderer/security_filter_peer.cc
|
| index 7d986843e77f6902304f5e1fa16fa449482d3669..64384927c32a3d9d306467631e375d28eb220562 100644
|
| --- a/chrome/renderer/security_filter_peer.cc
|
| +++ b/chrome/renderer/security_filter_peer.cc
|
| @@ -70,6 +70,8 @@ void SecurityFilterPeer::OnUploadProgress(uint64 position, uint64 size) {
|
| bool SecurityFilterPeer::OnReceivedRedirect(
|
| const GURL& new_url,
|
| const webkit_glue::ResourceResponseInfo& info,
|
| + const base::TimeTicks& start_time,
|
| + const base::TimeTicks& end_time,
|
| bool* has_new_first_party_for_cookies,
|
| GURL* new_first_party_for_cookies) {
|
| NOTREACHED();
|
| @@ -77,7 +79,9 @@ bool SecurityFilterPeer::OnReceivedRedirect(
|
| }
|
|
|
| void SecurityFilterPeer::OnReceivedResponse(
|
| - const webkit_glue::ResourceResponseInfo& info) {
|
| + const webkit_glue::ResourceResponseInfo& info,
|
| + const base::TimeTicks& start_time,
|
| + const base::TimeTicks& end_time) {
|
| NOTREACHED();
|
| }
|
|
|
| @@ -87,9 +91,10 @@ void SecurityFilterPeer::OnReceivedData(const char* data,
|
| NOTREACHED();
|
| }
|
|
|
| -void SecurityFilterPeer::OnCompletedRequest(const net::URLRequestStatus& status,
|
| - const std::string& security_info,
|
| - const base::Time& completion_time) {
|
| +void SecurityFilterPeer::OnCompletedRequest(
|
| + const net::URLRequestStatus& status,
|
| + const std::string& security_info,
|
| + const base::TimeTicks& completion_time) {
|
| NOTREACHED();
|
| }
|
|
|
| @@ -137,8 +142,12 @@ BufferedPeer::~BufferedPeer() {
|
| }
|
|
|
| void BufferedPeer::OnReceivedResponse(
|
| - const webkit_glue::ResourceResponseInfo& info) {
|
| + const webkit_glue::ResourceResponseInfo& info,
|
| + const base::TimeTicks& start_time,
|
| + const base::TimeTicks& end_time) {
|
| ProcessResponseInfo(info, &response_info_, mime_type_);
|
| + start_time_ = start_time;
|
| + end_time_ = end_time;
|
| }
|
|
|
| void BufferedPeer::OnReceivedData(const char* data,
|
| @@ -147,23 +156,24 @@ void BufferedPeer::OnReceivedData(const char* data,
|
| data_.append(data, data_length);
|
| }
|
|
|
| -void BufferedPeer::OnCompletedRequest(const net::URLRequestStatus& status,
|
| - const std::string& security_info,
|
| - const base::Time& completion_time) {
|
| +void BufferedPeer::OnCompletedRequest(
|
| + const net::URLRequestStatus& status,
|
| + const std::string& security_info,
|
| + const base::TimeTicks& completion_time) {
|
| // Make sure we delete ourselves at the end of this call.
|
| scoped_ptr<BufferedPeer> this_deleter(this);
|
|
|
| // Give sub-classes a chance at altering the data.
|
| if (status.status() != net::URLRequestStatus::SUCCESS || !DataReady()) {
|
| // Pretend we failed to load the resource.
|
| - original_peer_->OnReceivedResponse(response_info_);
|
| + original_peer_->OnReceivedResponse(response_info_, start_time_, end_time_);
|
| net::URLRequestStatus status(net::URLRequestStatus::CANCELED,
|
| net::ERR_ABORTED);
|
| original_peer_->OnCompletedRequest(status, security_info, completion_time);
|
| return;
|
| }
|
|
|
| - original_peer_->OnReceivedResponse(response_info_);
|
| + original_peer_->OnReceivedResponse(response_info_, start_time_, end_time_);
|
| if (!data_.empty())
|
| original_peer_->OnReceivedData(data_.data(),
|
| static_cast<int>(data_.size()),
|
| @@ -188,7 +198,11 @@ ReplaceContentPeer::~ReplaceContentPeer() {
|
| }
|
|
|
| void ReplaceContentPeer::OnReceivedResponse(
|
| - const webkit_glue::ResourceResponseInfo& info) {
|
| + const webkit_glue::ResourceResponseInfo& info,
|
| + const base::TimeTicks& start_time,
|
| + const base::TimeTicks& end_time) {
|
| + start_time_ = start_time;
|
| + end_time_ = end_time;
|
| // Ignore this, we'll serve some alternate content in OnCompletedRequest.
|
| }
|
|
|
| @@ -201,12 +215,12 @@ void ReplaceContentPeer::OnReceivedData(const char* data,
|
| void ReplaceContentPeer::OnCompletedRequest(
|
| const net::URLRequestStatus& status,
|
| const std::string& security_info,
|
| - const base::Time& completion_time) {
|
| + const base::TimeTicks& completion_time) {
|
| webkit_glue::ResourceResponseInfo info;
|
| ProcessResponseInfo(info, &info, mime_type_);
|
| info.security_info = security_info;
|
| info.content_length = static_cast<int>(data_.size());
|
| - original_peer_->OnReceivedResponse(info);
|
| + original_peer_->OnReceivedResponse(info, start_time_, end_time_);
|
| if (!data_.empty())
|
| original_peer_->OnReceivedData(data_.data(),
|
| static_cast<int>(data_.size()),
|
|
|