Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: content/browser/loader/resource_loader.h

Issue 42773002: Get ClientCertStore through ResourceContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for comment #7 Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "content/browser/loader/resource_handler.h" 11 #include "content/browser/loader/resource_handler.h"
12 #include "content/browser/ssl/ssl_error_handler.h" 12 #include "content/browser/ssl/ssl_error_handler.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/public/browser/resource_controller.h" 14 #include "content/public/browser/resource_controller.h"
15 #include "net/url_request/url_request.h" 15 #include "net/url_request/url_request.h"
16 16
17 namespace net {
18 class ClientCertStore;
19 }
20
21 namespace content { 17 namespace content {
22 class ResourceDispatcherHostLoginDelegate; 18 class ResourceDispatcherHostLoginDelegate;
23 class ResourceLoaderDelegate; 19 class ResourceLoaderDelegate;
24 class ResourceRequestInfoImpl; 20 class ResourceRequestInfoImpl;
25 class SSLClientAuthHandler; 21 class SSLClientAuthHandler;
26 22
27 // This class is responsible for driving the URLRequest (i.e., calling Start, 23 // This class is responsible for driving the URLRequest (i.e., calling Start,
28 // Read, and servicing events). It has a ResourceHandler, which is typically a 24 // Read, and servicing events). It has a ResourceHandler, which is typically a
29 // chain of ResourceHandlers, and is the ResourceController for its handler. 25 // chain of ResourceHandlers, and is the ResourceController for its handler.
30 class CONTENT_EXPORT ResourceLoader : public net::URLRequest::Delegate, 26 class CONTENT_EXPORT ResourceLoader : public net::URLRequest::Delegate,
(...skipping 18 matching lines...) Expand all
49 ResourceRequestInfoImpl* GetRequestInfo(); 45 ResourceRequestInfoImpl* GetRequestInfo();
50 46
51 void ClearLoginDelegate(); 47 void ClearLoginDelegate();
52 void ClearSSLClientAuthHandler(); 48 void ClearSSLClientAuthHandler();
53 49
54 // IPC message handlers: 50 // IPC message handlers:
55 void OnUploadProgressACK(); 51 void OnUploadProgressACK();
56 52
57 private: 53 private:
58 FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreLookup); 54 FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreLookup);
59 55 FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreNull);
60 ResourceLoader(scoped_ptr<net::URLRequest> request,
61 scoped_ptr<ResourceHandler> handler,
62 ResourceLoaderDelegate* delegate,
63 scoped_ptr<net::ClientCertStore> client_cert_store);
64
65 // Initialization logic shared between the public and private constructor.
66 void Init(scoped_ptr<net::URLRequest> request,
67 scoped_ptr<ResourceHandler> handler,
68 ResourceLoaderDelegate* delegate,
69 scoped_ptr<net::ClientCertStore> client_cert_store);
70 56
71 // net::URLRequest::Delegate implementation: 57 // net::URLRequest::Delegate implementation:
72 virtual void OnReceivedRedirect(net::URLRequest* request, 58 virtual void OnReceivedRedirect(net::URLRequest* request,
73 const GURL& new_url, 59 const GURL& new_url,
74 bool* defer) OVERRIDE; 60 bool* defer) OVERRIDE;
75 virtual void OnAuthRequired(net::URLRequest* request, 61 virtual void OnAuthRequired(net::URLRequest* request,
76 net::AuthChallengeInfo* info) OVERRIDE; 62 net::AuthChallengeInfo* info) OVERRIDE;
77 virtual void OnCertificateRequested(net::URLRequest* request, 63 virtual void OnCertificateRequested(net::URLRequest* request,
78 net::SSLCertRequestInfo* info) OVERRIDE; 64 net::SSLCertRequestInfo* info) OVERRIDE;
79 virtual void OnSSLCertificateError(net::URLRequest* request, 65 virtual void OnSSLCertificateError(net::URLRequest* request,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 uint64 last_upload_position_; 112 uint64 last_upload_position_;
127 bool waiting_for_upload_progress_ack_; 113 bool waiting_for_upload_progress_ack_;
128 base::TimeTicks last_upload_ticks_; 114 base::TimeTicks last_upload_ticks_;
129 base::TimeTicks read_deferral_start_time_; 115 base::TimeTicks read_deferral_start_time_;
130 116
131 // Indicates that we are in a state of being transferred to a new downstream 117 // Indicates that we are in a state of being transferred to a new downstream
132 // consumer. We are waiting for a notification to complete the transfer, at 118 // consumer. We are waiting for a notification to complete the transfer, at
133 // which point we'll receive a new ResourceHandler. 119 // which point we'll receive a new ResourceHandler.
134 bool is_transferring_; 120 bool is_transferring_;
135 121
136 scoped_ptr<net::ClientCertStore> client_cert_store_;
137
138 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; 122 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_;
139 123
140 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); 124 DISALLOW_COPY_AND_ASSIGN(ResourceLoader);
141 }; 125 };
142 126
143 } // namespace content 127 } // namespace content
144 128
145 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ 129 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698