| 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 "content/browser/loader/resource_loader.h" | 5 #include "content/browser/loader/resource_loader.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/profiler/scoped_tracker.h" | 10 #include "base/profiler/scoped_tracker.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 Cancel(); | 274 Cancel(); |
| 275 } else if (*defer) { | 275 } else if (*defer) { |
| 276 deferred_stage_ = DEFERRED_REDIRECT; // Follow redirect when resumed. | 276 deferred_stage_ = DEFERRED_REDIRECT; // Follow redirect when resumed. |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 | 279 |
| 280 void ResourceLoader::OnAuthRequired(net::URLRequest* unused, | 280 void ResourceLoader::OnAuthRequired(net::URLRequest* unused, |
| 281 net::AuthChallengeInfo* auth_info) { | 281 net::AuthChallengeInfo* auth_info) { |
| 282 DCHECK_EQ(request_.get(), unused); | 282 DCHECK_EQ(request_.get(), unused); |
| 283 | 283 |
| 284 if (request_->load_flags() & net::LOAD_DO_NOT_PROMPT_FOR_LOGIN) { | 284 ResourceRequestInfoImpl* info = GetRequestInfo(); |
| 285 if (info->do_not_prompt_for_login()) { |
| 285 request_->CancelAuth(); | 286 request_->CancelAuth(); |
| 286 return; | 287 return; |
| 287 } | 288 } |
| 288 | 289 |
| 289 // Create a login dialog on the UI thread to get authentication data, or pull | 290 // Create a login dialog on the UI thread to get authentication data, or pull |
| 290 // from cache and continue on the IO thread. | 291 // from cache and continue on the IO thread. |
| 291 | 292 |
| 292 DCHECK(!login_delegate_.get()) | 293 DCHECK(!login_delegate_.get()) |
| 293 << "OnAuthRequired called with login_delegate pending"; | 294 << "OnAuthRequired called with login_delegate pending"; |
| 294 login_delegate_ = delegate_->CreateLoginDelegate(this, auth_info); | 295 login_delegate_ = delegate_->CreateLoginDelegate(this, auth_info); |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 850 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
| 850 } | 851 } |
| 851 } | 852 } |
| 852 | 853 |
| 853 void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) { | 854 void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) { |
| 854 ssl_client_auth_handler_.reset(); | 855 ssl_client_auth_handler_.reset(); |
| 855 request_->ContinueWithCertificate(cert); | 856 request_->ContinueWithCertificate(cert); |
| 856 } | 857 } |
| 857 | 858 |
| 858 } // namespace content | 859 } // namespace content |
| OLD | NEW |