| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 is_transferring_(false), | 141 is_transferring_(false), |
| 142 times_cancelled_before_request_start_(0), | 142 times_cancelled_before_request_start_(0), |
| 143 started_request_(false), | 143 started_request_(false), |
| 144 times_cancelled_after_request_start_(0), | 144 times_cancelled_after_request_start_(0), |
| 145 weak_ptr_factory_(this) { | 145 weak_ptr_factory_(this) { |
| 146 request_->set_delegate(this); | 146 request_->set_delegate(this); |
| 147 handler_->SetController(this); | 147 handler_->SetController(this); |
| 148 } | 148 } |
| 149 | 149 |
| 150 ResourceLoader::~ResourceLoader() { | 150 ResourceLoader::~ResourceLoader() { |
| 151 delegate_->LoaderDestroyed(this); |
| 152 |
| 151 if (login_delegate_.get()) | 153 if (login_delegate_.get()) |
| 152 login_delegate_->OnRequestCancelled(); | 154 login_delegate_->OnRequestCancelled(); |
| 153 ssl_client_auth_handler_.reset(); | 155 ssl_client_auth_handler_.reset(); |
| 154 | 156 |
| 155 // Run ResourceHandler destructor before we tear-down the rest of our state | 157 // Run ResourceHandler destructor before we tear-down the rest of our state |
| 156 // as the ResourceHandler may want to inspect the URLRequest and other state. | 158 // as the ResourceHandler may want to inspect the URLRequest and other state. |
| 157 handler_.reset(); | 159 handler_.reset(); |
| 158 } | 160 } |
| 159 | 161 |
| 160 void ResourceLoader::StartRequest() { | 162 void ResourceLoader::StartRequest() { |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 case net::URLRequestStatus::FAILED: | 712 case net::URLRequestStatus::FAILED: |
| 711 status = STATUS_UNDEFINED; | 713 status = STATUS_UNDEFINED; |
| 712 break; | 714 break; |
| 713 } | 715 } |
| 714 | 716 |
| 715 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 717 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
| 716 } | 718 } |
| 717 } | 719 } |
| 718 | 720 |
| 719 } // namespace content | 721 } // namespace content |
| OLD | NEW |