| 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 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 STATUS_CANCELED, | 116 STATUS_CANCELED, |
| 117 STATUS_MAX, | 117 STATUS_MAX, |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 enum DeferredStage { | 120 enum DeferredStage { |
| 121 DEFERRED_NONE, | 121 DEFERRED_NONE, |
| 122 DEFERRED_START, | 122 DEFERRED_START, |
| 123 DEFERRED_NETWORK_START, | 123 DEFERRED_NETWORK_START, |
| 124 DEFERRED_REDIRECT, | 124 DEFERRED_REDIRECT, |
| 125 DEFERRED_READ, | 125 DEFERRED_READ, |
| 126 DEFERRED_RESPONSE_COMPLETE, |
| 126 DEFERRED_FINISH | 127 DEFERRED_FINISH |
| 127 }; | 128 }; |
| 128 DeferredStage deferred_stage_; | 129 DeferredStage deferred_stage_; |
| 129 | 130 |
| 130 scoped_ptr<net::URLRequest> request_; | 131 scoped_ptr<net::URLRequest> request_; |
| 131 scoped_ptr<ResourceHandler> handler_; | 132 scoped_ptr<ResourceHandler> handler_; |
| 132 ResourceLoaderDelegate* delegate_; | 133 ResourceLoaderDelegate* delegate_; |
| 133 | 134 |
| 134 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_; | 135 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_; |
| 135 scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_; | 136 scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_; |
| 136 | 137 |
| 137 uint64 last_upload_position_; | 138 uint64 last_upload_position_; |
| 138 bool waiting_for_upload_progress_ack_; | 139 bool waiting_for_upload_progress_ack_; |
| 139 base::TimeTicks last_upload_ticks_; | 140 base::TimeTicks last_upload_ticks_; |
| 140 base::TimeTicks read_deferral_start_time_; | 141 base::TimeTicks read_deferral_start_time_; |
| 141 | 142 |
| 142 // Indicates that we are in a state of being transferred to a new downstream | 143 // Indicates that we are in a state of being transferred to a new downstream |
| 143 // consumer. We are waiting for a notification to complete the transfer, at | 144 // consumer. We are waiting for a notification to complete the transfer, at |
| 144 // which point we'll receive a new ResourceHandler. | 145 // which point we'll receive a new ResourceHandler. |
| 145 bool is_transferring_; | 146 bool is_transferring_; |
| 146 | 147 |
| 147 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; | 148 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; |
| 148 | 149 |
| 149 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); | 150 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); |
| 150 }; | 151 }; |
| 151 | 152 |
| 152 } // namespace content | 153 } // namespace content |
| 153 | 154 |
| 154 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 155 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
| OLD | NEW |