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

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: Store SSLStatus in NavigationHandle Created 4 years, 3 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:
39 static void GetSSLStatusForRequest(const GURL& url,
40 const net::SSLInfo& ssl_info,
41 int child_id,
42 CertStore* cert_store,
43 SSLStatus* ssl_status);
44
38 ResourceLoader(std::unique_ptr<net::URLRequest> request, 45 ResourceLoader(std::unique_ptr<net::URLRequest> request,
39 std::unique_ptr<ResourceHandler> handler, 46 std::unique_ptr<ResourceHandler> handler,
40 CertStore* cert_store, 47 CertStore* cert_store,
41 ResourceLoaderDelegate* delegate); 48 ResourceLoaderDelegate* delegate);
42 ~ResourceLoader() override; 49 ~ResourceLoader() override;
43 50
44 void StartRequest(); 51 void StartRequest();
45 void CancelRequest(bool from_renderer); 52 void CancelRequest(bool from_renderer);
46 53
47 bool is_transferring() const { return is_transferring_; } 54 bool is_transferring() const { return is_transferring_; }
(...skipping 110 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