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

Unified Diff: net/ssl/default_channel_id_store.cc

Issue 1476263004: Remove ScopedVector from IDStores (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 5 years 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/default_channel_id_store.h ('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 b0497e1f63184e80c5160fc8db5193f8903c379c..f9db093f132225d82fb7c0f20a64e558e940043e 100644
--- a/net/ssl/default_channel_id_store.cc
+++ b/net/ssl/default_channel_id_store.cc
@@ -302,16 +302,16 @@ void DefaultChannelIDStore::InitStore() {
}
void DefaultChannelIDStore::OnLoaded(
- scoped_ptr<ScopedVector<ChannelID> > channel_ids) {
+ scoped_ptr<std::vector<scoped_ptr<ChannelID>>> channel_ids) {
DCHECK(CalledOnValidThread());
-
- for (std::vector<ChannelID*>::const_iterator it = channel_ids->begin();
+ for (std::vector<scoped_ptr<ChannelID>>::iterator it = channel_ids->begin();
it != channel_ids->end(); ++it) {
DCHECK(channel_ids_.find((*it)->server_identifier()) ==
channel_ids_.end());
- channel_ids_[(*it)->server_identifier()] = *it;
+ std::string ident = (*it)->server_identifier();
+ channel_ids_[ident] = it->release();
}
- channel_ids->weak_clear();
+ channel_ids->clear();
loaded_ = true;
@@ -327,10 +327,8 @@ void DefaultChannelIDStore::OnLoaded(
UMA_HISTOGRAM_COUNTS_100("DomainBoundCerts.TaskWaitCount",
waiting_tasks_.size());
-
- for (ScopedVector<Task>::iterator i = waiting_tasks_.begin();
- i != waiting_tasks_.end(); ++i)
- (*i)->Run(this);
+ for (scoped_ptr<Task>& i : waiting_tasks_)
+ i->Run(this);
waiting_tasks_.clear();
}
« no previous file with comments | « net/ssl/default_channel_id_store.h ('k') | net/ssl/default_channel_id_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698