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

Unified Diff: net/ssl/default_channel_id_store.cc

Issue 2095523002: Make //crypto factories return std::unique_ptr<>s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: I'm blind Created 4 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
« no previous file with comments | « net/ssl/channel_id_store.cc ('k') | net/ssl/default_channel_id_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ebac855e3600f64b6987565b81cc321b0f5d574c..d8d5d793d0bd15d75537cc994a1b1adde1c08527 100644
--- a/net/ssl/default_channel_id_store.cc
+++ b/net/ssl/default_channel_id_store.cc
@@ -242,7 +242,7 @@ int DefaultChannelIDStore::GetChannelID(
return ERR_FILE_NOT_FOUND;
ChannelID* channel_id = it->second;
- key_result->reset(channel_id->key()->Copy());
+ *key_result = channel_id->key()->Copy();
return OK;
}
@@ -290,7 +290,7 @@ void DefaultChannelIDStore::SetForceKeepSessionState() {
DCHECK(CalledOnValidThread());
InitIfNecessary();
- if (store_.get())
+ if (store_)
store_->SetForceKeepSessionState();
}
@@ -310,7 +310,7 @@ void DefaultChannelIDStore::DeleteAllInMemory() {
void DefaultChannelIDStore::InitStore() {
DCHECK(CalledOnValidThread());
- DCHECK(store_.get()) << "Store must exist to initialize";
+ DCHECK(store_) << "Store must exist to initialize";
DCHECK(!loaded_);
store_->Load(base::Bind(&DefaultChannelIDStore::OnLoaded,
@@ -381,7 +381,7 @@ void DefaultChannelIDStore::SyncDeleteForDomainsCreatedBetween(
channel_id->creation_time() >= delete_begin) &&
(delete_end.is_null() || channel_id->creation_time() < delete_end) &&
domain_predicate.Run(channel_id->server_identifier())) {
- if (store_.get())
+ if (store_)
store_->DeleteChannelID(*channel_id);
delete channel_id;
channel_ids_.erase(cur);
@@ -428,7 +428,7 @@ void DefaultChannelIDStore::InternalDeleteChannelID(
return; // There is nothing to delete.
ChannelID* channel_id = it->second;
- if (store_.get())
+ if (store_)
store_->DeleteChannelID(*channel_id);
channel_ids_.erase(it);
delete channel_id;
@@ -439,14 +439,14 @@ void DefaultChannelIDStore::InternalInsertChannelID(
DCHECK(CalledOnValidThread());
DCHECK(loaded_);
- if (store_.get())
- store_->AddChannelID(*(channel_id.get()));
+ if (store_)
+ store_->AddChannelID(*channel_id);
const std::string& server_identifier = channel_id->server_identifier();
channel_ids_[server_identifier] = channel_id.release();
}
bool DefaultChannelIDStore::IsEphemeral() {
- return store_.get() == nullptr;
+ return !store_;
}
DefaultChannelIDStore::PersistentStore::PersistentStore() {}
« no previous file with comments | « net/ssl/channel_id_store.cc ('k') | net/ssl/default_channel_id_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698