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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 // No matter what, we want to report our status as IO pending since we will | 501 // No matter what, we want to report our status as IO pending since we will |
| 502 // be notifying our consumer asynchronously via OnStartCompleted. | 502 // be notifying our consumer asynchronously via OnStartCompleted. |
| 503 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); | 503 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); |
| 504 | 504 |
| 505 // If the request was destroyed, then there is no more work to do. | 505 // If the request was destroyed, then there is no more work to do. |
| 506 if (!request_) | 506 if (!request_) |
| 507 return; | 507 return; |
| 508 | 508 |
| 509 CookieStore* cookie_store = request_->context()->cookie_store(); | 509 CookieStore* cookie_store = request_->context()->cookie_store(); |
| 510 if (cookie_store && !(request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES)) { | 510 if (cookie_store && !(request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES)) { |
| 511 net::CookieMonster* cookie_monster = cookie_store->GetCookieMonster(); | 511 net::CookieMonster* cookie_monster = cookie_store->GetCookieMonster(); |
|
cbentzel
2012/11/28 14:33:13
Question more for Erik: I find all the GetCookieMo
erikwright (departed)
2012/11/30 16:43:52
GetAllCookiesForURLAsync is returning full metadat
| |
| 512 if (cookie_monster) { | 512 if (cookie_monster) { |
| 513 cookie_monster->GetAllCookiesForURLAsync( | 513 cookie_monster->GetAllCookiesForURLAsync( |
| 514 request_->url(), | 514 request_->url(), |
| 515 base::Bind(&URLRequestHttpJob::CheckCookiePolicyAndLoad, | 515 base::Bind(&URLRequestHttpJob::CheckCookiePolicyAndLoad, |
| 516 weak_factory_.GetWeakPtr())); | 516 weak_factory_.GetWeakPtr())); |
| 517 } else { | 517 } else { |
| 518 DoLoadCookies(); | 518 CheckCookiePolicyAndLoad(CookieList()); |
|
droger
2012/11/23 16:00:12
I pass an empty list as 'default' argument here, a
erikwright (departed)
2012/11/27 05:17:17
ChromeNetworkDelegate passes the list to TabSpecif
cbentzel
2012/11/28 14:36:42
Out of curiosity: is the Cookie header already sup
droger
2012/11/28 14:47:44
Looking at the code, the headers are set a bit aft
erikwright (departed)
2012/11/30 16:43:52
The problem is that the CookieList is cookies with
| |
| 519 } | 519 } |
| 520 } else { | 520 } else { |
| 521 DoStartTransaction(); | 521 DoStartTransaction(); |
| 522 } | 522 } |
| 523 } | 523 } |
| 524 | 524 |
| 525 void URLRequestHttpJob::DoLoadCookies() { | 525 void URLRequestHttpJob::DoLoadCookies() { |
| 526 CookieOptions options; | 526 CookieOptions options; |
| 527 options.set_include_httponly(); | 527 options.set_include_httponly(); |
| 528 request_->context()->cookie_store()->GetCookiesWithInfoAsync( | 528 request_->context()->cookie_store()->GetCookiesWithInfoAsync( |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1576 | 1576 |
| 1577 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1577 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
| 1578 awaiting_callback_ = false; | 1578 awaiting_callback_ = false; |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 void URLRequestHttpJob::OnDetachRequest() { | 1581 void URLRequestHttpJob::OnDetachRequest() { |
| 1582 http_transaction_delegate_->OnDetachRequest(); | 1582 http_transaction_delegate_->OnDetachRequest(); |
| 1583 } | 1583 } |
| 1584 | 1584 |
| 1585 } // namespace net | 1585 } // namespace net |
| OLD | NEW |