Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 654 } | 654 } |
| 655 } | 655 } |
| 656 | 656 |
| 657 void URLRequestHttpJob::DoLoadCookies() { | 657 void URLRequestHttpJob::DoLoadCookies() { |
| 658 CookieOptions options; | 658 CookieOptions options; |
| 659 options.set_include_httponly(); | 659 options.set_include_httponly(); |
| 660 | 660 |
| 661 // TODO(mkwst): Drop this `if` once we decide whether or not to ship | 661 // TODO(mkwst): Drop this `if` once we decide whether or not to ship |
| 662 // first-party cookies: https://crbug.com/459154 | 662 // first-party cookies: https://crbug.com/459154 |
| 663 if (network_delegate() && | 663 if (network_delegate() && |
| 664 network_delegate()->FirstPartyOnlyCookieExperimentEnabled()) | 664 network_delegate()->ExperimentalCookieFeaturesEnabled()) |
|
mmenke
2015/10/12 14:25:42
Should be calling the On* method here (Old bug...)
estark
2015/10/12 14:48:08
How so? The On* version is private.
| |
| 665 options.set_first_party_url(request_->first_party_for_cookies()); | 665 options.set_first_party_url(request_->first_party_for_cookies()); |
| 666 else | 666 else |
| 667 options.set_include_first_party_only(); | 667 options.set_include_first_party_only(); |
| 668 | 668 |
| 669 request_->context()->cookie_store()->GetCookiesWithOptionsAsync( | 669 request_->context()->cookie_store()->GetCookiesWithOptionsAsync( |
| 670 request_->url(), options, base::Bind(&URLRequestHttpJob::OnCookiesLoaded, | 670 request_->url(), options, base::Bind(&URLRequestHttpJob::OnCookiesLoaded, |
| 671 weak_factory_.GetWeakPtr())); | 671 weak_factory_.GetWeakPtr())); |
| 672 } | 672 } |
| 673 | 673 |
| 674 void URLRequestHttpJob::CheckCookiePolicyAndLoad( | 674 void URLRequestHttpJob::CheckCookiePolicyAndLoad( |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1575 return override_response_headers_.get() ? | 1575 return override_response_headers_.get() ? |
| 1576 override_response_headers_.get() : | 1576 override_response_headers_.get() : |
| 1577 transaction_->GetResponseInfo()->headers.get(); | 1577 transaction_->GetResponseInfo()->headers.get(); |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1580 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
| 1581 awaiting_callback_ = false; | 1581 awaiting_callback_ = false; |
| 1582 } | 1582 } |
| 1583 | 1583 |
| 1584 } // namespace net | 1584 } // namespace net |
| OLD | NEW |