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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 return request_->CanSetCookie(cookie_line, options); | 360 return request_->CanSetCookie(cookie_line, options); |
361 } | 361 } |
362 | 362 |
363 bool URLRequestJob::CanEnablePrivacyMode() const { | 363 bool URLRequestJob::CanEnablePrivacyMode() const { |
364 if (!request_) | 364 if (!request_) |
365 return false; // The request was destroyed, so there is no more work to do. | 365 return false; // The request was destroyed, so there is no more work to do. |
366 | 366 |
367 return request_->CanEnablePrivacyMode(); | 367 return request_->CanEnablePrivacyMode(); |
368 } | 368 } |
369 | 369 |
370 CookieStore* URLRequestJob::GetCookieStore() const { | |
371 DCHECK(request_); | |
372 | |
373 return request_->cookie_store(); | |
374 } | |
375 | |
376 void URLRequestJob::NotifyBeforeNetworkStart(bool* defer) { | 370 void URLRequestJob::NotifyBeforeNetworkStart(bool* defer) { |
377 if (!request_) | 371 if (!request_) |
378 return; | 372 return; |
379 | 373 |
380 request_->NotifyBeforeNetworkStart(defer); | 374 request_->NotifyBeforeNetworkStart(defer); |
381 } | 375 } |
382 | 376 |
383 void URLRequestJob::NotifyHeadersComplete() { | 377 void URLRequestJob::NotifyHeadersComplete() { |
384 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. | 378 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. |
385 tracked_objects::ScopedTracker tracking_profile( | 379 tracked_objects::ScopedTracker tracking_profile( |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 // Alter the referrer if redirecting cross-origin (especially HTTP->HTTPS). | 949 // Alter the referrer if redirecting cross-origin (especially HTTP->HTTPS). |
956 redirect_info.new_referrer = | 950 redirect_info.new_referrer = |
957 ComputeReferrerForRedirect(request_->referrer_policy(), | 951 ComputeReferrerForRedirect(request_->referrer_policy(), |
958 request_->referrer(), | 952 request_->referrer(), |
959 redirect_info.new_url).spec(); | 953 redirect_info.new_url).spec(); |
960 | 954 |
961 return redirect_info; | 955 return redirect_info; |
962 } | 956 } |
963 | 957 |
964 } // namespace net | 958 } // namespace net |
OLD | NEW |