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

Unified Diff: net/traffic_annotation/network_traffic_annotation.h

Issue 2908723002: Partial network traffic annotation check for tests updated. (Closed)
Patch Set: Merged. Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/traffic_annotation/network_traffic_annotation.h
diff --git a/net/traffic_annotation/network_traffic_annotation.h b/net/traffic_annotation/network_traffic_annotation.h
index 3f06cb97b4e5dd462715fd6a7fa1210f88b055a6..98d9d4cd8496f39d5134fe29f417e3c427a496a8 100644
--- a/net/traffic_annotation/network_traffic_annotation.h
+++ b/net/traffic_annotation/network_traffic_annotation.h
@@ -115,8 +115,10 @@ NetworkTrafficAnnotationTag CompleteNetworkTrafficAnnotation(
const PartialNetworkTrafficAnnotationTag& partial_annotation,
const char (&proto)[N2]) {
#if defined(_DEBUG) || defined(DCHECK_ALWAYS_ON)
- DCHECK_EQ(COMPUTE_STRING_HASH(unique_id),
- partial_annotation.completing_id_hash_code);
+ DCHECK(partial_annotation.completing_id_hash_code ==
+ COMPUTE_STRING_HASH(unique_id) ||
+ partial_annotation.unique_id_hash_code ==
+ COMPUTE_STRING_HASH("test_partial"));
#endif
return NetworkTrafficAnnotationTag({partial_annotation.unique_id_hash_code});
}
@@ -132,8 +134,10 @@ NetworkTrafficAnnotationTag BranchedCompleteNetworkTrafficAnnotation(
const PartialNetworkTrafficAnnotationTag& partial_annotation,
const char (&proto)[N3]) {
#if defined(_DEBUG) || defined(DCHECK_ALWAYS_ON)
- DCHECK_EQ(COMPUTE_STRING_HASH(group_id),
- partial_annotation.completing_id_hash_code);
+ DCHECK(partial_annotation.completing_id_hash_code ==
+ COMPUTE_STRING_HASH(unique_id) ||
+ partial_annotation.unique_id_hash_code ==
+ COMPUTE_STRING_HASH("test_partial"));
#endif
return NetworkTrafficAnnotationTag({COMPUTE_STRING_HASH(unique_id)});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698