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

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: address comments 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
« no previous file with comments | « net/ssl/channel_id_service.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7cae014a2f09c547b2d8f1f33aa2bce7509399e1 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.
@@ -288,12 +291,12 @@ ChannelIDService::ChannelIDService(
const scoped_refptr<base::TaskRunner>& task_runner)
: channel_id_store_(channel_id_store),
task_runner_(task_runner),
+ id_(g_next_id.GetNext()),
requests_(0),
key_store_hits_(0),
inflight_joins_(0),
workers_created_(0),
- weak_ptr_factory_(this) {
-}
+ weak_ptr_factory_(this) {}
ChannelIDService::~ChannelIDService() {
STLDeleteValues(&inflight_);
« no previous file with comments | « net/ssl/channel_id_service.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698