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

Unified Diff: content/browser/loader/resource_loader.h

Issue 12035105: Move client certificates retrieval logic out of the SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ryan's remarks Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_loader.h
diff --git a/content/browser/loader/resource_loader.h b/content/browser/loader/resource_loader.h
index 14a67ec9e9c3587f047882a40b0ea27682dfc5c2..a80105e2baf704ee403cd9690e85d8250b4a8c56 100644
--- a/content/browser/loader/resource_loader.h
+++ b/content/browser/loader/resource_loader.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
#define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
+#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/loader/resource_handler.h"
@@ -12,6 +13,10 @@
#include "content/public/browser/resource_controller.h"
#include "net/url_request/url_request.h"
+namespace net {
+class ClientCertStore;
+}
+
namespace content {
class ResourceDispatcherHostLoginDelegate;
class ResourceLoaderDelegate;
@@ -21,9 +26,9 @@ class SSLClientAuthHandler;
// This class is responsible for driving the URLRequest (i.e., calling Start,
// Read, and servicing events). It has a ResourceHandler, which is typically a
// chain of ResourceHandlers, and is the ResourceController for its handler.
-class ResourceLoader : public net::URLRequest::Delegate,
- public SSLErrorHandler::Delegate,
- public ResourceController {
+class CONTENT_EXPORT ResourceLoader : public net::URLRequest::Delegate,
Ryan Sleevi 2013/02/01 22:48:37 This is incorrect, in that ResourceLoader should *
ppi 2013/02/04 19:35:54 I would have meant that if we had CONTENT_EXPORT_P
+ public SSLErrorHandler::Delegate,
+ public ResourceController {
public:
ResourceLoader(scoped_ptr<net::URLRequest> request,
scoped_ptr<ResourceHandler> handler,
@@ -50,6 +55,12 @@ class ResourceLoader : public net::URLRequest::Delegate,
void OnUploadProgressACK();
private:
+ FRIEND_TEST_ALL_PREFIXES(ResourceLoaderTest, ClientCertStoreLookup);
+
+ // Hook for testing - swaps the client cert store with the provided one.
+ void swap_client_cert_store_for_testing(
+ scoped_ptr<net::ClientCertStore>& store);
Ryan Sleevi 2013/02/01 22:48:37 style: 1) It is not accepted by Google C++ Style
ppi 2013/02/04 19:35:54 Thanks! In patch set 7 I have moved to using a pri
+
// net::URLRequest::Delegate implementation:
virtual void OnReceivedRedirect(net::URLRequest* request,
const GURL& new_url,
@@ -114,6 +125,8 @@ class ResourceLoader : public net::URLRequest::Delegate,
// which point we'll receive a new ResourceHandler.
bool is_transferring_;
+ scoped_ptr<net::ClientCertStore> client_cert_store_;
+
base::WeakPtrFactory<ResourceLoader> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ResourceLoader);
« no previous file with comments | « no previous file | content/browser/loader/resource_loader.cc » ('j') | content/browser/loader/resource_loader_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698