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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 ResourceRequestInfoImpl* GetRequestInfo(); | 50 ResourceRequestInfoImpl* GetRequestInfo(); |
51 | 51 |
52 void ClearLoginDelegate(); | 52 void ClearLoginDelegate(); |
53 | 53 |
54 // IPC message handlers: | 54 // IPC message handlers: |
55 void OnUploadProgressACK(); | 55 void OnUploadProgressACK(); |
56 | 56 |
57 private: | 57 private: |
58 FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreLookup); | 58 FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreLookup); |
59 FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreNull); | 59 FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreNull); |
| 60 FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreAsyncCancel); |
60 | 61 |
61 // net::URLRequest::Delegate implementation: | 62 // net::URLRequest::Delegate implementation: |
62 void OnReceivedRedirect(net::URLRequest* request, | 63 void OnReceivedRedirect(net::URLRequest* request, |
63 const net::RedirectInfo& redirect_info, | 64 const net::RedirectInfo& redirect_info, |
64 bool* defer) override; | 65 bool* defer) override; |
65 void OnAuthRequired(net::URLRequest* request, | 66 void OnAuthRequired(net::URLRequest* request, |
66 net::AuthChallengeInfo* info) override; | 67 net::AuthChallengeInfo* info) override; |
67 void OnCertificateRequested(net::URLRequest* request, | 68 void OnCertificateRequested(net::URLRequest* request, |
68 net::SSLCertRequestInfo* info) override; | 69 net::SSLCertRequestInfo* info) override; |
69 void OnSSLCertificateError(net::URLRequest* request, | 70 void OnSSLCertificateError(net::URLRequest* request, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 DEFERRED_RESPONSE_COMPLETE, | 127 DEFERRED_RESPONSE_COMPLETE, |
127 DEFERRED_FINISH | 128 DEFERRED_FINISH |
128 }; | 129 }; |
129 DeferredStage deferred_stage_; | 130 DeferredStage deferred_stage_; |
130 | 131 |
131 scoped_ptr<net::URLRequest> request_; | 132 scoped_ptr<net::URLRequest> request_; |
132 scoped_ptr<ResourceHandler> handler_; | 133 scoped_ptr<ResourceHandler> handler_; |
133 ResourceLoaderDelegate* delegate_; | 134 ResourceLoaderDelegate* delegate_; |
134 | 135 |
135 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_; | 136 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_; |
136 scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_; | 137 scoped_ptr<SSLClientAuthHandler> ssl_client_auth_handler_; |
137 | 138 |
138 uint64 last_upload_position_; | 139 uint64 last_upload_position_; |
139 bool waiting_for_upload_progress_ack_; | 140 bool waiting_for_upload_progress_ack_; |
140 base::TimeTicks last_upload_ticks_; | 141 base::TimeTicks last_upload_ticks_; |
141 base::TimeTicks read_deferral_start_time_; | 142 base::TimeTicks read_deferral_start_time_; |
142 | 143 |
143 // Indicates that we are in a state of being transferred to a new downstream | 144 // Indicates that we are in a state of being transferred to a new downstream |
144 // consumer. We are waiting for a notification to complete the transfer, at | 145 // consumer. We are waiting for a notification to complete the transfer, at |
145 // which point we'll receive a new ResourceHandler. | 146 // which point we'll receive a new ResourceHandler. |
146 bool is_transferring_; | 147 bool is_transferring_; |
147 | 148 |
148 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; | 149 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; |
149 | 150 |
150 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); | 151 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); |
151 }; | 152 }; |
152 | 153 |
153 } // namespace content | 154 } // namespace content |
154 | 155 |
155 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ | 156 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ |
OLD | NEW |