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

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

Issue 1781003003: Implement referred Token Bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // plugin could set a referrer although sending the referrer is inhibited. 311 // plugin could set a referrer although sending the referrer is inhibited.
312 request_info_.extra_headers.RemoveHeader(HttpRequestHeaders::kReferer); 312 request_info_.extra_headers.RemoveHeader(HttpRequestHeaders::kReferer);
313 313
314 // Our consumer should have made sure that this is a safe referrer. See for 314 // Our consumer should have made sure that this is a safe referrer. See for
315 // instance WebCore::FrameLoader::HideReferrer. 315 // instance WebCore::FrameLoader::HideReferrer.
316 if (referrer.is_valid()) { 316 if (referrer.is_valid()) {
317 request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer, 317 request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
318 referrer.spec()); 318 referrer.spec());
319 } 319 }
320 320
321 request_info_.token_binding_referrer = request_->token_binding_referrer();
322
321 request_info_.extra_headers.SetHeaderIfMissing( 323 request_info_.extra_headers.SetHeaderIfMissing(
322 HttpRequestHeaders::kUserAgent, 324 HttpRequestHeaders::kUserAgent,
323 http_user_agent_settings_ ? 325 http_user_agent_settings_ ?
324 http_user_agent_settings_->GetUserAgent() : std::string()); 326 http_user_agent_settings_->GetUserAgent() : std::string());
325 327
326 AddExtraHeaders(); 328 AddExtraHeaders();
327 AddCookieHeaderAndStart(); 329 AddCookieHeaderAndStart();
328 } 330 }
329 331
330 void URLRequestHttpJob::Kill() { 332 void URLRequestHttpJob::Kill() {
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 return override_response_headers_.get() ? 1566 return override_response_headers_.get() ?
1565 override_response_headers_.get() : 1567 override_response_headers_.get() :
1566 transaction_->GetResponseInfo()->headers.get(); 1568 transaction_->GetResponseInfo()->headers.get();
1567 } 1569 }
1568 1570
1569 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1571 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1570 awaiting_callback_ = false; 1572 awaiting_callback_ = false;
1571 } 1573 }
1572 1574
1573 } // namespace net 1575 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698