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

Side by Side Diff: net/url_request/url_request_job.cc

Issue 2137193002: Update token binding code to latest drafts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary cast Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « net/tools/testserver/testserver.py ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_job.h" 5 #include "net/url_request/url_request_job.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 redirect_info.new_referrer_policy = request_->referrer_policy(); 1006 redirect_info.new_referrer_policy = request_->referrer_policy();
1007 } 1007 }
1008 1008
1009 // Alter the referrer if redirecting cross-origin (especially HTTP->HTTPS). 1009 // Alter the referrer if redirecting cross-origin (especially HTTP->HTTPS).
1010 redirect_info.new_referrer = 1010 redirect_info.new_referrer =
1011 ComputeReferrerForRedirect(redirect_info.new_referrer_policy, 1011 ComputeReferrerForRedirect(redirect_info.new_referrer_policy,
1012 request_->referrer(), redirect_info.new_url) 1012 request_->referrer(), redirect_info.new_url)
1013 .spec(); 1013 .spec();
1014 1014
1015 std::string include_referer; 1015 std::string include_referer;
1016 request_->GetResponseHeaderByName("include-referer-token-binding-id", 1016 request_->GetResponseHeaderByName("include-referred-token-binding-id",
1017 &include_referer); 1017 &include_referer);
1018 if (include_referer == "true" && 1018 if (include_referer == "true" &&
1019 request_->ssl_info().token_binding_negotiated) { 1019 request_->ssl_info().token_binding_negotiated) {
1020 redirect_info.referred_token_binding_host = url.host(); 1020 redirect_info.referred_token_binding_host = url.host();
1021 } 1021 }
1022 1022
1023 return redirect_info; 1023 return redirect_info;
1024 } 1024 }
1025 1025
1026 void URLRequestJob::MaybeNotifyNetworkBytes() { 1026 void URLRequestJob::MaybeNotifyNetworkBytes() {
(...skipping 13 matching lines...) Expand all
1040 int64_t total_sent_bytes = GetTotalSentBytes(); 1040 int64_t total_sent_bytes = GetTotalSentBytes();
1041 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_); 1041 DCHECK_GE(total_sent_bytes, last_notified_total_sent_bytes_);
1042 if (total_sent_bytes > last_notified_total_sent_bytes_) { 1042 if (total_sent_bytes > last_notified_total_sent_bytes_) {
1043 network_delegate_->NotifyNetworkBytesSent( 1043 network_delegate_->NotifyNetworkBytesSent(
1044 request_, total_sent_bytes - last_notified_total_sent_bytes_); 1044 request_, total_sent_bytes - last_notified_total_sent_bytes_);
1045 } 1045 }
1046 last_notified_total_sent_bytes_ = total_sent_bytes; 1046 last_notified_total_sent_bytes_ = total_sent_bytes;
1047 } 1047 }
1048 1048
1049 } // namespace net 1049 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/testserver/testserver.py ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698