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

Unified Diff: net/quic/chromium/crypto/channel_id_chromium.cc

Issue 2417183003: Remove stl_util's deletion functions from remaining quic code. (Closed)
Patch Set: rebase Created 4 years, 2 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/quic/chromium/crypto/channel_id_chromium.h ('k') | net/quic/chromium/crypto/proof_verifier_chromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/crypto/channel_id_chromium.cc
diff --git a/net/quic/chromium/crypto/channel_id_chromium.cc b/net/quic/chromium/crypto/channel_id_chromium.cc
index cfaf61b0ea166e1a1a3848f71f6fc171d680b4ef..164e1e5841e8029f38b037f1377a8179d14f9e05 100644
--- a/net/quic/chromium/crypto/channel_id_chromium.cc
+++ b/net/quic/chromium/crypto/channel_id_chromium.cc
@@ -7,7 +7,7 @@
#include <utility>
#include <vector>
-#include "base/stl_util.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "crypto/ec_private_key.h"
#include "crypto/ec_signature_creator.h"
@@ -200,25 +200,24 @@ ChannelIDSourceChromium::ChannelIDSourceChromium(
: channel_id_service_(channel_id_service) {}
ChannelIDSourceChromium::~ChannelIDSourceChromium() {
- base::STLDeleteElements(&active_jobs_);
}
QuicAsyncStatus ChannelIDSourceChromium::GetChannelIDKey(
const std::string& hostname,
std::unique_ptr<ChannelIDKey>* channel_id_key,
ChannelIDSourceCallback* callback) {
- std::unique_ptr<Job> job(new Job(this, channel_id_service_));
+ std::unique_ptr<Job> job = base::MakeUnique<Job>(this, channel_id_service_);
QuicAsyncStatus status =
job->GetChannelIDKey(hostname, channel_id_key, callback);
if (status == QUIC_PENDING) {
- active_jobs_.insert(job.release());
+ Job* job_ptr = job.get();
+ active_jobs_[job_ptr] = std::move(job);
}
return status;
}
void ChannelIDSourceChromium::OnJobComplete(Job* job) {
active_jobs_.erase(job);
- delete job;
}
} // namespace net
« no previous file with comments | « net/quic/chromium/crypto/channel_id_chromium.h ('k') | net/quic/chromium/crypto/proof_verifier_chromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698