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

Unified Diff: net/ssl/channel_id_service.cc

Issue 1770983002: Add atomic sequence number to ChannelIDService and check that in URLRequestHttpJob logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small fixes Created 4 years, 9 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/ssl/channel_id_service.cc
diff --git a/net/ssl/channel_id_service.cc b/net/ssl/channel_id_service.cc
index e17b813cd7334d8baba18582cb941e5f28445e5a..814ee89ce0037b38ffc2d8a3582fc19b4bca7b47 100644
--- a/net/ssl/channel_id_service.cc
+++ b/net/ssl/channel_id_service.cc
@@ -8,6 +8,7 @@
#include <limits>
#include <utility>
+#include "base/atomic_sequence_num.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback_helpers.h"
@@ -38,6 +39,8 @@ namespace net {
namespace {
+base::StaticAtomicSequenceNumber g_next_id;
+
// Used by the GetDomainBoundCertResult histogram to record the final
// outcome of each GetChannelID or GetOrCreateChannelID call.
// Do not re-use values.
@@ -293,6 +296,7 @@ ChannelIDService::ChannelIDService(
inflight_joins_(0),
workers_created_(0),
weak_ptr_factory_(this) {
+ id_ = g_next_id.GetNext();
}
ChannelIDService::~ChannelIDService() {

Powered by Google App Engine
This is Rietveld 408576698