Index: net/ssl/default_channel_id_store.cc |
diff --git a/net/ssl/default_channel_id_store.cc b/net/ssl/default_channel_id_store.cc |
index b71d7b3507e13dda8267e21466fdc0e3cd2b35e3..a9944320a1784841764384f7b8ff8339ea9c8655 100644 |
--- a/net/ssl/default_channel_id_store.cc |
+++ b/net/ssl/default_channel_id_store.cc |
@@ -61,16 +61,14 @@ DefaultChannelIDStore::GetChannelIDTask::~GetChannelIDTask() { |
void DefaultChannelIDStore::GetChannelIDTask::Run( |
DefaultChannelIDStore* store) { |
- base::Time expiration_time; |
std::string private_key_result; |
- std::string cert_result; |
- int err = store->GetChannelID( |
- server_identifier_, &expiration_time, &private_key_result, |
- &cert_result, GetChannelIDCallback()); |
+ std::string public_key_result; |
+ int err = store->GetChannelID(server_identifier_, &private_key_result, |
+ &public_key_result, GetChannelIDCallback()); |
DCHECK(err != ERR_IO_PENDING); |
InvokeCallback(base::Bind(callback_, err, server_identifier_, |
- expiration_time, private_key_result, cert_result)); |
+ private_key_result, public_key_result)); |
} |
// -------------------------------------------------------------------------- |
@@ -80,31 +78,27 @@ class DefaultChannelIDStore::SetChannelIDTask |
public: |
SetChannelIDTask(const std::string& server_identifier, |
base::Time creation_time, |
- base::Time expiration_time, |
const std::string& private_key, |
- const std::string& cert); |
+ const std::string& public_key); |
~SetChannelIDTask() override; |
void Run(DefaultChannelIDStore* store) override; |
private: |
std::string server_identifier_; |
base::Time creation_time_; |
- base::Time expiration_time_; |
std::string private_key_; |
- std::string cert_; |
+ std::string public_key_; |
}; |
DefaultChannelIDStore::SetChannelIDTask::SetChannelIDTask( |
const std::string& server_identifier, |
base::Time creation_time, |
- base::Time expiration_time, |
const std::string& private_key, |
- const std::string& cert) |
+ const std::string& public_key) |
: server_identifier_(server_identifier), |
creation_time_(creation_time), |
- expiration_time_(expiration_time), |
private_key_(private_key), |
- cert_(cert) { |
+ public_key_(public_key) { |
} |
DefaultChannelIDStore::SetChannelIDTask::~SetChannelIDTask() { |
@@ -112,8 +106,8 @@ DefaultChannelIDStore::SetChannelIDTask::~SetChannelIDTask() { |
void DefaultChannelIDStore::SetChannelIDTask::Run( |
DefaultChannelIDStore* store) { |
- store->SyncSetChannelID(server_identifier_, creation_time_, |
- expiration_time_, private_key_, cert_); |
+ store->SyncSetChannelID(server_identifier_, creation_time_, private_key_, |
+ public_key_); |
} |
// -------------------------------------------------------------------------- |
@@ -213,10 +207,10 @@ DefaultChannelIDStore::GetAllChannelIDsTask:: |
void DefaultChannelIDStore::GetAllChannelIDsTask::Run( |
DefaultChannelIDStore* store) { |
- ChannelIDList cert_list; |
- store->SyncGetAllChannelIDs(&cert_list); |
+ ChannelIDList key_list; |
+ store->SyncGetAllChannelIDs(&key_list); |
- InvokeCallback(base::Bind(callback_, cert_list)); |
+ InvokeCallback(base::Bind(callback_, key_list)); |
} |
// -------------------------------------------------------------------------- |
@@ -229,12 +223,10 @@ DefaultChannelIDStore::DefaultChannelIDStore( |
store_(store), |
weak_ptr_factory_(this) {} |
-int DefaultChannelIDStore::GetChannelID( |
- const std::string& server_identifier, |
- base::Time* expiration_time, |
- std::string* private_key_result, |
- std::string* cert_result, |
- const GetChannelIDCallback& callback) { |
+int DefaultChannelIDStore::GetChannelID(const std::string& server_identifier, |
+ std::string* private_key_result, |
+ std::string* public_key_result, |
+ const GetChannelIDCallback& callback) { |
DCHECK(CalledOnValidThread()); |
InitIfNecessary(); |
@@ -250,22 +242,18 @@ int DefaultChannelIDStore::GetChannelID( |
return ERR_FILE_NOT_FOUND; |
ChannelID* channel_id = it->second; |
- *expiration_time = channel_id->expiration_time(); |
*private_key_result = channel_id->private_key(); |
- *cert_result = channel_id->cert(); |
+ *public_key_result = channel_id->public_key(); |
return OK; |
} |
-void DefaultChannelIDStore::SetChannelID( |
- const std::string& server_identifier, |
- base::Time creation_time, |
- base::Time expiration_time, |
- const std::string& private_key, |
- const std::string& cert) { |
+void DefaultChannelIDStore::SetChannelID(const std::string& server_identifier, |
+ base::Time creation_time, |
+ const std::string& private_key, |
+ const std::string& public_key) { |
RunOrEnqueueTask(scoped_ptr<Task>(new SetChannelIDTask( |
- server_identifier, creation_time, expiration_time, private_key, |
- cert))); |
+ server_identifier, creation_time, private_key, public_key))); |
} |
void DefaultChannelIDStore::DeleteChannelID( |
@@ -366,18 +354,15 @@ void DefaultChannelIDStore::OnLoaded( |
void DefaultChannelIDStore::SyncSetChannelID( |
const std::string& server_identifier, |
base::Time creation_time, |
- base::Time expiration_time, |
const std::string& private_key, |
- const std::string& cert) { |
+ const std::string& public_key) { |
DCHECK(CalledOnValidThread()); |
DCHECK(loaded_); |
InternalDeleteChannelID(server_identifier); |
InternalInsertChannelID( |
server_identifier, |
- new ChannelID( |
- server_identifier, creation_time, expiration_time, private_key, |
- cert)); |
+ new ChannelID(server_identifier, creation_time, private_key, public_key)); |
} |
void DefaultChannelIDStore::SyncDeleteChannelID( |