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

Unified Diff: net/socket/ssl_client_socket_unittest.cc

Issue 356713005: Rename ServerBoundCert => ChannelID to reflect the current name (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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: net/socket/ssl_client_socket_unittest.cc
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index 2eaa47e058f6e21a0072d75b8f2f620623a7c4b9..e0a625892e849c5e62dd3e3b3eec09856df55d33 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -23,7 +23,7 @@
#include "net/socket/client_socket_handle.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/tcp_client_socket.h"
-#include "net/ssl/default_server_bound_cert_store.h"
+#include "net/ssl/default_channel_id_store.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/ssl_config_service.h"
#include "net/test/cert_test_util.h"
@@ -591,62 +591,62 @@ class DeleteSocketCallback : public TestCompletionCallbackBase {
DISALLOW_COPY_AND_ASSIGN(DeleteSocketCallback);
};
-// A ServerBoundCertStore that always returns an error when asked for a
+// A ChannelIDStore that always returns an error when asked for a
// certificate.
wtc 2014/07/01 19:50:53 certificate => channel ID
Ryan Hamilton 2014/07/21 19:12:09 Done.
-class FailingServerBoundCertStore : public ServerBoundCertStore {
- virtual int GetServerBoundCert(const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetCertCallback& callback) OVERRIDE {
+class FailingChannelIDStore : public ChannelIDStore {
+ virtual int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetCertCallback& callback) OVERRIDE {
return ERR_UNEXPECTED;
}
- virtual void SetServerBoundCert(const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) OVERRIDE {}
- virtual void DeleteServerBoundCert(const std::string& server_identifier,
- const base::Closure& completion_callback)
+ virtual void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) OVERRIDE {}
+ virtual void DeleteChannelID(const std::string& server_identifier,
+ const base::Closure& completion_callback)
OVERRIDE {}
virtual void DeleteAllCreatedBetween(base::Time delete_begin,
base::Time delete_end,
const base::Closure& completion_callback)
OVERRIDE {}
virtual void DeleteAll(const base::Closure& completion_callback) OVERRIDE {}
- virtual void GetAllServerBoundCerts(const GetCertListCallback& callback)
+ virtual void GetAllChannelIDs(const GetCertListCallback& callback)
OVERRIDE {}
virtual int GetCertCount() OVERRIDE { return 0; }
virtual void SetForceKeepSessionState() OVERRIDE {}
};
-// A ServerBoundCertStore that asynchronously returns an error when asked for a
+// A ChannelIDStore that asynchronously returns an error when asked for a
// certificate.
wtc 2014/07/01 19:50:53 certificate => channel ID
Ryan Hamilton 2014/07/21 19:12:09 Done.
-class AsyncFailingServerBoundCertStore : public ServerBoundCertStore {
- virtual int GetServerBoundCert(const std::string& server_identifier,
- base::Time* expiration_time,
- std::string* private_key_result,
- std::string* cert_result,
- const GetCertCallback& callback) OVERRIDE {
+class AsyncFailingChannelIDStore : public ChannelIDStore {
+ virtual int GetChannelID(const std::string& server_identifier,
+ base::Time* expiration_time,
+ std::string* private_key_result,
+ std::string* cert_result,
+ const GetCertCallback& callback) OVERRIDE {
base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(callback, ERR_UNEXPECTED,
server_identifier, base::Time(), "", ""));
return ERR_IO_PENDING;
}
- virtual void SetServerBoundCert(const std::string& server_identifier,
- base::Time creation_time,
- base::Time expiration_time,
- const std::string& private_key,
- const std::string& cert) OVERRIDE {}
- virtual void DeleteServerBoundCert(const std::string& server_identifier,
- const base::Closure& completion_callback)
+ virtual void SetChannelID(const std::string& server_identifier,
+ base::Time creation_time,
+ base::Time expiration_time,
+ const std::string& private_key,
+ const std::string& cert) OVERRIDE {}
+ virtual void DeleteChannelID(const std::string& server_identifier,
+ const base::Closure& completion_callback)
OVERRIDE {}
virtual void DeleteAllCreatedBetween(base::Time delete_begin,
base::Time delete_end,
const base::Closure& completion_callback)
OVERRIDE {}
virtual void DeleteAll(const base::Closure& completion_callback) OVERRIDE {}
- virtual void GetAllServerBoundCerts(const GetCertListCallback& callback)
+ virtual void GetAllChannelIDs(const GetCertListCallback& callback)
OVERRIDE {}
virtual int GetCertCount() OVERRIDE { return 0; }
virtual void SetForceKeepSessionState() OVERRIDE {}
@@ -905,26 +905,26 @@ class SSLClientSocketChannelIDTest : public SSLClientSocketTest {
protected:
void EnableChannelID() {
cert_service_.reset(
- new ServerBoundCertService(new DefaultServerBoundCertStore(NULL),
- base::MessageLoopProxy::current()));
- context_.server_bound_cert_service = cert_service_.get();
+ new ChannelIDService(new DefaultChannelIDStore(NULL),
+ base::MessageLoopProxy::current()));
+ context_.channel_id_service = cert_service_.get();
}
void EnableFailingChannelID() {
- cert_service_.reset(new ServerBoundCertService(
- new FailingServerBoundCertStore(), base::MessageLoopProxy::current()));
- context_.server_bound_cert_service = cert_service_.get();
+ cert_service_.reset(new ChannelIDService(
+ new FailingChannelIDStore(), base::MessageLoopProxy::current()));
+ context_.channel_id_service = cert_service_.get();
}
void EnableAsyncFailingChannelID() {
- cert_service_.reset(new ServerBoundCertService(
- new AsyncFailingServerBoundCertStore(),
+ cert_service_.reset(new ChannelIDService(
+ new AsyncFailingChannelIDStore(),
base::MessageLoopProxy::current()));
- context_.server_bound_cert_service = cert_service_.get();
+ context_.channel_id_service = cert_service_.get();
}
private:
- scoped_ptr<ServerBoundCertService> cert_service_;
+ scoped_ptr<ChannelIDService> cert_service_;
wtc 2014/07/01 19:50:53 cert_service_ => channel_id_service_
Ryan Hamilton 2014/07/21 19:12:09 Done.
};
//-----------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698