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

Unified Diff: net/base/origin_bound_cert_service.h

Issue 9617039: Change Origin bound certs -> Domain bound certs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | net/base/origin_bound_cert_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/origin_bound_cert_service.h
diff --git a/net/base/origin_bound_cert_service.h b/net/base/origin_bound_cert_service.h
index d9096df772c0a5b0b640fd7620c346e22c2f182c..355379f7fda1f73696713846ca05034093bb940b 100644
--- a/net/base/origin_bound_cert_service.h
+++ b/net/base/origin_bound_cert_service.h
@@ -20,14 +20,14 @@
namespace net {
-class OriginBoundCertServiceJob;
-class OriginBoundCertServiceWorker;
-class OriginBoundCertStore;
+class ServerBoundCertServiceJob;
+class ServerBoundCertServiceWorker;
+class ServerBoundCertStore;
-// A class for creating and fetching origin bound certs.
+// A class for creating and fetching server bound certs.
// Inherits from NonThreadSafe in order to use the function
// |CalledOnValidThread|.
-class NET_EXPORT OriginBoundCertService
+class NET_EXPORT ServerBoundCertService
: NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
// Opaque type used to cancel a request.
@@ -38,18 +38,18 @@ class NET_EXPORT OriginBoundCertService
// being unable to import unencrypted PrivateKeyInfo for EC keys.)
static const char kEPKIPassword[];
- // This object owns origin_bound_cert_store.
- explicit OriginBoundCertService(
- OriginBoundCertStore* origin_bound_cert_store);
+ // This object owns server_bound_cert_store.
+ explicit ServerBoundCertService(
+ ServerBoundCertStore* server_bound_cert_store);
- ~OriginBoundCertService();
+ ~ServerBoundCertService();
// Returns the domain to be used for |host|. The domain is the
// "registry controlled domain", or the "ETLD + 1" where one exists, or
// the origin otherwise.
static std::string GetDomainForHost(const std::string& host);
- // Fetches the origin bound cert for the specified origin of the specified
+ // Fetches the domain bound cert for the specified origin of the specified
// type if one exists and creates one otherwise. Returns OK if successful or
// an error code upon failure.
//
@@ -67,7 +67,7 @@ class NET_EXPORT OriginBoundCertService
//
// |*out_req| will be filled with a handle to the async request. This handle
// is not valid after the request has completed.
- int GetOriginBoundCert(
+ int GetDomainBoundCert(
const std::string& origin,
const std::vector<uint8>& requested_types,
SSLClientCertType* type,
@@ -77,12 +77,12 @@ class NET_EXPORT OriginBoundCertService
RequestHandle* out_req);
// Cancels the specified request. |req| is the handle returned by
- // GetOriginBoundCert(). After a request is canceled, its completion
+ // GetDomainBoundCert(). After a request is canceled, its completion
// callback will not be called.
void CancelRequest(RequestHandle req);
- // Returns the backing OriginBoundCertStore.
- OriginBoundCertStore* GetCertStore();
+ // Returns the backing ServerBoundCertStore.
+ ServerBoundCertStore* GetCertStore();
// Public only for unit testing.
int cert_count();
@@ -91,7 +91,7 @@ class NET_EXPORT OriginBoundCertService
uint64 inflight_joins() const { return inflight_joins_; }
private:
- friend class OriginBoundCertServiceWorker; // Calls HandleResult.
+ friend class ServerBoundCertServiceWorker; // Calls HandleResult.
// On success, |private_key| stores a DER-encoded PrivateKeyInfo
// struct, |cert| stores a DER-encoded certificate, |creation_time| stores the
@@ -101,7 +101,7 @@ class NET_EXPORT OriginBoundCertService
// |serial_number| is passed in because it is created with the function
// base::RandInt, which opens the file /dev/urandom. /dev/urandom is opened
// with a LazyInstance, which is not allowed on a worker thread.
- static int GenerateCert(const std::string& origin,
+ static int GenerateCert(const std::string& server_identifier,
SSLClientCertType type,
uint32 serial_number,
base::Time* creation_time,
@@ -109,7 +109,7 @@ class NET_EXPORT OriginBoundCertService
std::string* private_key,
std::string* cert);
- void HandleResult(const std::string& origin,
+ void HandleResult(const std::string& server_identifier,
int error,
SSLClientCertType type,
base::Time creation_time,
@@ -117,17 +117,17 @@ class NET_EXPORT OriginBoundCertService
const std::string& private_key,
const std::string& cert);
- scoped_ptr<OriginBoundCertStore> origin_bound_cert_store_;
+ scoped_ptr<ServerBoundCertStore> server_bound_cert_store_;
- // inflight_ maps from an origin to an active generation which is taking
+ // inflight_ maps from a server to an active generation which is taking
// place.
- std::map<std::string, OriginBoundCertServiceJob*> inflight_;
+ std::map<std::string, ServerBoundCertServiceJob*> inflight_;
uint64 requests_;
uint64 cert_store_hits_;
uint64 inflight_joins_;
- DISALLOW_COPY_AND_ASSIGN(OriginBoundCertService);
+ DISALLOW_COPY_AND_ASSIGN(ServerBoundCertService);
};
} // namespace net
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | net/base/origin_bound_cert_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698