Chromium Code Reviews| Index: net/url_request/url_request.cc |
| diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc |
| index 144029f76b210d8d297f48313b61a7f10a2d360b..60f0636619ee37938b56506506c185f68bf69225 100644 |
| --- a/net/url_request/url_request.cc |
| +++ b/net/url_request/url_request.cc |
| @@ -123,17 +123,6 @@ void URLRequest::Delegate::OnSSLCertificateError(URLRequest* request, |
| request->Cancel(); |
| } |
| -bool URLRequest::Delegate::CanGetCookies(const URLRequest* request, |
| - const CookieList& cookie_list) const { |
| - return true; |
| -} |
| - |
| -bool URLRequest::Delegate::CanSetCookie(const URLRequest* request, |
| - const std::string& cookie_line, |
| - CookieOptions* options) const { |
| - return true; |
| -} |
| - |
| /////////////////////////////////////////////////////////////////////////////// |
| // URLRequest |
| @@ -837,15 +826,20 @@ void URLRequest::NotifySSLCertificateError(const SSLInfo& ssl_info, |
| } |
| bool URLRequest::CanGetCookies(const CookieList& cookie_list) const { |
| - if (delegate_) |
| - return delegate_->CanGetCookies(this, cookie_list); |
| + if (context_ && context_->network_delegate()) { |
|
cbentzel
2012/03/05 12:56:12
Would it make sense to DCHECK that LOAD_DO_NOT_SEN
willchan no longer on Chromium
2012/03/06 02:59:01
Agreed.
jochen (gone - plz use gerrit)
2012/03/08 13:00:02
Done.
|
| + return context_->network_delegate()->NotifyReadingCookies(this, |
| + cookie_list); |
| + } |
| return false; |
| } |
| bool URLRequest::CanSetCookie(const std::string& cookie_line, |
| CookieOptions* options) const { |
| - if (delegate_) |
| - return delegate_->CanSetCookie(this, cookie_line, options); |
| + if (context_ && context_->network_delegate()) { |
|
cbentzel
2012/03/05 12:56:12
Similar DCHECK for LOAD_DO_NOT_SAVE_COOKIES
willchan no longer on Chromium
2012/03/06 02:59:01
Agreed.
jochen (gone - plz use gerrit)
2012/03/08 13:00:02
Done.
|
| + return context_->network_delegate()->NotifySettingCookie(this, |
| + cookie_line, |
| + options); |
| + } |
| return false; |
| } |