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

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

Issue 2239273002: Don't use SSLStatus from FrameHostMsg_DidCommitProvisionalLoad and instead cache it on the browser … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: slight cleanup Created 4 years, 4 months 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
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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 #include "content/browser/loader/resource_handler.h" 13 #include "content/browser/loader/resource_handler.h"
14 #include "content/browser/ssl/ssl_client_auth_handler.h" 14 #include "content/browser/ssl/ssl_client_auth_handler.h"
15 #include "content/browser/ssl/ssl_error_handler.h" 15 #include "content/browser/ssl/ssl_error_handler.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/public/browser/resource_controller.h" 17 #include "content/public/browser/resource_controller.h"
18 #include "net/url_request/url_request.h" 18 #include "net/url_request/url_request.h"
19 19
20 namespace net { 20 namespace net {
21 class X509Certificate; 21 class X509Certificate;
22 } 22 }
23 23
24 namespace content { 24 namespace content {
25 class CertStore; 25 class CertStore;
26 class ResourceDispatcherHostLoginDelegate; 26 class ResourceDispatcherHostLoginDelegate;
27 class ResourceLoaderDelegate; 27 class ResourceLoaderDelegate;
28 class ResourceRequestInfoImpl; 28 class ResourceRequestInfoImpl;
29 struct SSLStatus;
29 30
30 // This class is responsible for driving the URLRequest (i.e., calling Start, 31 // This class is responsible for driving the URLRequest (i.e., calling Start,
31 // Read, and servicing events). It has a ResourceHandler, which is typically a 32 // Read, and servicing events). It has a ResourceHandler, which is typically a
32 // chain of ResourceHandlers, and is the ResourceController for its handler. 33 // chain of ResourceHandlers, and is the ResourceController for its handler.
33 class CONTENT_EXPORT ResourceLoader : public net::URLRequest::Delegate, 34 class CONTENT_EXPORT ResourceLoader : public net::URLRequest::Delegate,
34 public SSLErrorHandler::Delegate, 35 public SSLErrorHandler::Delegate,
35 public SSLClientAuthHandler::Delegate, 36 public SSLClientAuthHandler::Delegate,
36 public ResourceController { 37 public ResourceController {
37 public: 38 public:
38 ResourceLoader(std::unique_ptr<net::URLRequest> request, 39 ResourceLoader(std::unique_ptr<net::URLRequest> request,
(...skipping 16 matching lines...) Expand all
55 56
56 // Returns a pointer to the ResourceResponse for a request that is 57 // Returns a pointer to the ResourceResponse for a request that is
57 // being transferred to a new consumer. The response is valid between 58 // being transferred to a new consumer. The response is valid between
58 // the time that the request is marked as transferring via 59 // the time that the request is marked as transferring via
59 // MarkAsTransferring() and the time that the transfer is completed 60 // MarkAsTransferring() and the time that the transfer is completed
60 // via CompleteTransfer(). 61 // via CompleteTransfer().
61 ResourceResponse* transferring_response() { 62 ResourceResponse* transferring_response() {
62 return transferring_response_.get(); 63 return transferring_response_.get();
63 } 64 }
64 65
66 static void GetSSLStatusForRequest(const GURL& url,
67 const net::SSLInfo& ssl_info,
68 int child_id,
69 CertStore* cert_store,
70 SSLStatus* ssl_status);
71
65 private: 72 private:
66 // net::URLRequest::Delegate implementation: 73 // net::URLRequest::Delegate implementation:
67 void OnReceivedRedirect(net::URLRequest* request, 74 void OnReceivedRedirect(net::URLRequest* request,
68 const net::RedirectInfo& redirect_info, 75 const net::RedirectInfo& redirect_info,
69 bool* defer) override; 76 bool* defer) override;
70 void OnAuthRequired(net::URLRequest* request, 77 void OnAuthRequired(net::URLRequest* request,
71 net::AuthChallengeInfo* info) override; 78 net::AuthChallengeInfo* info) override;
72 void OnCertificateRequested(net::URLRequest* request, 79 void OnCertificateRequested(net::URLRequest* request,
73 net::SSLCertRequestInfo* info) override; 80 net::SSLCertRequestInfo* info) override;
74 void OnSSLCertificateError(net::URLRequest* request, 81 void OnSSLCertificateError(net::URLRequest* request,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 CertStore* cert_store_; 165 CertStore* cert_store_;
159 166
160 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_; 167 base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_;
161 168
162 DISALLOW_COPY_AND_ASSIGN(ResourceLoader); 169 DISALLOW_COPY_AND_ASSIGN(ResourceLoader);
163 }; 170 };
164 171
165 } // namespace content 172 } // namespace content
166 173
167 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_ 174 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698