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 | |
295 void URLRequestJob::NotifyBeforeNetworkStart(bool* defer) { | 289 void URLRequestJob::NotifyBeforeNetworkStart(bool* defer) { |
296 if (!request_) | 290 if (!request_) |
297 return; | 291 return; |
298 | 292 |
299 request_->NotifyBeforeNetworkStart(defer); | 293 request_->NotifyBeforeNetworkStart(defer); |
300 } | 294 } |
301 | 295 |
302 void URLRequestJob::NotifyHeadersComplete() { | 296 void URLRequestJob::NotifyHeadersComplete() { |
303 if (!request_ || !request_->has_delegate()) | 297 if (!request_ || !request_->has_delegate()) |
304 return; // The request was destroyed, so there is no more work to do. | 298 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... |
760 } | 754 } |
761 | 755 |
762 bool URLRequestJob::FilterHasData() { | 756 bool URLRequestJob::FilterHasData() { |
763 return filter_.get() && filter_->stream_data_len(); | 757 return filter_.get() && filter_->stream_data_len(); |
764 } | 758 } |
765 | 759 |
766 void URLRequestJob::UpdatePacketReadTimes() { | 760 void URLRequestJob::UpdatePacketReadTimes() { |
767 } | 761 } |
768 | 762 |
769 } // namespace net | 763 } // namespace net |
OLD | NEW |