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

Unified Diff: components/feedback/anonymizer_tool.cc

Issue 2905723002: Anonymize UUIDs (Closed)
Patch Set: 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 | components/feedback/anonymizer_tool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/feedback/anonymizer_tool.cc
diff --git a/components/feedback/anonymizer_tool.cc b/components/feedback/anonymizer_tool.cc
index f44dadf8ace8d1e4bd3a9b39b8e962e630d4e1bb..198f979a0ab561987c37935b4ba9ee823e6fecec 100644
--- a/components/feedback/anonymizer_tool.cc
+++ b/components/feedback/anonymizer_tool.cc
@@ -165,14 +165,18 @@ const char* kCustomPatternsWithContext[] = {
// The |kCustomPatternWithoutContext| array defines further patterns to match
// and anonymize. Each pattern consists of a single capturing group.
CustomPatternWithoutContext kCustomPatternsWithoutContext[] = {
- {"URL", "(?i)(" IRI ")"},
- // Email Addresses need to come after URLs because they can be part
- // of a query parameter.
- {"email", "(?i)([0-9a-z._%+-]+@[a-z0-9.-]+\\.[a-z]{2,6})"},
- // IP filter rules need to come after URLs so that they don't disturb the
- // URL pattern in case the IP address is part of a URL.
- {"IPv4", "(?i)(" IPV4ADDRESS ")"},
- {"IPv6", "(?i)(" IPV6ADDRESS ")"},
+ {"URL", "(?i)(" IRI ")"},
+ // Email Addresses need to come after URLs because they can be part
+ // of a query parameter.
+ {"email", "(?i)([0-9a-z._%+-]+@[a-z0-9.-]+\\.[a-z]{2,6})"},
+ // IP filter rules need to come after URLs so that they don't disturb the
+ // URL pattern in case the IP address is part of a URL.
+ {"IPv4", "(?i)(" IPV4ADDRESS ")"},
+ {"IPv6", "(?i)(" IPV6ADDRESS ")"},
+ // Universal Unique Identifiers (UUIDs).
+ {"UUID",
+ "(?i)([0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-"
+ "[0-9a-zA-Z]{12})"},
};
// Like RE2's FindAndConsume, searches for the first occurrence of |pattern| in
« no previous file with comments | « no previous file | components/feedback/anonymizer_tool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698