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_job.h" | 5 #include "net/url_request/url_request_job.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/power_monitor/power_monitor.h" | 10 #include "base/power_monitor/power_monitor.h" |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 return request_->CanSetCookie(cookie_line, options); | 279 return request_->CanSetCookie(cookie_line, options); |
280 } | 280 } |
281 | 281 |
282 bool URLRequestJob::CanEnablePrivacyMode() const { | 282 bool URLRequestJob::CanEnablePrivacyMode() const { |
283 if (!request_) | 283 if (!request_) |
284 return false; // The request was destroyed, so there is no more work to do. | 284 return false; // The request was destroyed, so there is no more work to do. |
285 | 285 |
286 return request_->CanEnablePrivacyMode(); | 286 return request_->CanEnablePrivacyMode(); |
287 } | 287 } |
288 | 288 |
| 289 CookieStore* URLRequestJob::GetCookieStore() const { |
| 290 DCHECK(request_); |
| 291 |
| 292 return request_->cookie_store(); |
| 293 } |
| 294 |
289 void URLRequestJob::NotifyBeforeNetworkStart(bool* defer) { | 295 void URLRequestJob::NotifyBeforeNetworkStart(bool* defer) { |
290 if (!request_) | 296 if (!request_) |
291 return; | 297 return; |
292 | 298 |
293 request_->NotifyBeforeNetworkStart(defer); | 299 request_->NotifyBeforeNetworkStart(defer); |
294 } | 300 } |
295 | 301 |
296 void URLRequestJob::NotifyHeadersComplete() { | 302 void URLRequestJob::NotifyHeadersComplete() { |
297 if (!request_ || !request_->has_delegate()) | 303 if (!request_ || !request_->has_delegate()) |
298 return; // The request was destroyed, so there is no more work to do. | 304 return; // The request was destroyed, so there is no more work to do. |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 } | 760 } |
755 | 761 |
756 bool URLRequestJob::FilterHasData() { | 762 bool URLRequestJob::FilterHasData() { |
757 return filter_.get() && filter_->stream_data_len(); | 763 return filter_.get() && filter_->stream_data_len(); |
758 } | 764 } |
759 | 765 |
760 void URLRequestJob::UpdatePacketReadTimes() { | 766 void URLRequestJob::UpdatePacketReadTimes() { |
761 } | 767 } |
762 | 768 |
763 } // namespace net | 769 } // namespace net |
OLD | NEW |