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

Unified Diff: net/url_request/url_request_http_job.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/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index d30e9985153b27175b602a3a7680942e446dc690..838320a569fd76372c7b2c2b23ae3c0d251aa9b9 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -78,6 +78,10 @@ void LogChannelIDAndCookieStores(const net::URLRequestContext* context,
NO_COOKIE_STORE = 4,
NO_CHANNEL_ID_STORE = 5,
KNOWN_MISMATCH = 6,
+ EPHEMERAL_MATCH = 7,
+ EPHEMERAL_MISMATCH = 8,
+ PERSISTENT_MATCH = 9,
+ PERSISTENT_MISMATCH = 10,
EPHEMERALITY_MAX
} ephemerality;
const net::HttpNetworkSession::Params* params =
@@ -89,16 +93,26 @@ void LogChannelIDAndCookieStores(const net::URLRequestContext* context,
ephemerality = NO_COOKIE_STORE;
} else if (params->channel_id_service->GetChannelIDStore()->IsEphemeral()) {
if (cookie_store->IsEphemeral()) {
- ephemerality = CID_EPHEMERAL_COOKIE_EPHEMERAL;
+ if (context->channel_id_service() &&
+ params->channel_id_service->GetUniqueID() ==
+ context->channel_id_service()->GetUniqueID()) {
+ ephemerality = EPHEMERAL_MATCH;
+ } else {
+ ephemerality = EPHEMERAL_MISMATCH;
+ }
} else if (context->has_known_mismatched_cookie_store()) {
ephemerality = KNOWN_MISMATCH;
} else {
ephemerality = CID_EPHEMERAL_COOKIE_PERSISTENT;
}
- } else if (cookie_store->IsEphemeral()) {
- ephemerality = CID_PERSISTENT_COOKIE_EPHEMERAL;
- } else {
+ } else if (!cookie_store->IsEphemeral()) {
ephemerality = CID_PERSISTENT_COOKIE_PERSISTENT;
mattm 2016/03/09 21:33:01 this looks wrong.. Above,CID_EPHEMERAL_COOKIE_EPH
nharper 2016/03/09 21:52:07 I goofed when making this half of the change. Your
+ } else if (context->channel_id_service() &&
+ params->channel_id_service->GetUniqueID() ==
+ context->channel_id_service()->GetUniqueID()) {
+ ephemerality = PERSISTENT_MATCH;
+ } else {
+ ephemerality = PERSISTENT_MISMATCH;
}
UMA_HISTOGRAM_ENUMERATION("Net.TokenBinding.StoreEphemerality", ephemerality,
EPHEMERALITY_MAX);

Powered by Google App Engine
This is Rietveld 408576698