Index: components/feedback/anonymizer_tool.h |
diff --git a/components/feedback/anonymizer_tool.h b/components/feedback/anonymizer_tool.h |
index 54a690fe9fa677eeb3ebb3a0a4d2b533d7a1d89f..f7408e194d3e5878495ae3d4118eb411d9d2fa3e 100644 |
--- a/components/feedback/anonymizer_tool.h |
+++ b/components/feedback/anonymizer_tool.h |
@@ -13,6 +13,11 @@ |
namespace feedback { |
+struct CustomPatternWithoutContext { |
vasilii
2015/12/22 12:31:42
A comment.
battre
2016/01/08 14:14:32
Done.
|
+ const char* alias; |
+ const char* pattern; |
+}; |
+ |
class AnonymizerTool { |
public: |
AnonymizerTool(); |
@@ -27,10 +32,14 @@ class AnonymizerTool { |
std::string AnonymizeMACAddresses(const std::string& input); |
std::string AnonymizeCustomPatterns(std::string input); |
- static std::string AnonymizeCustomPattern( |
+ static std::string AnonymizeCustomPatternWithContext( |
const std::string& input, |
const std::string& pattern, |
std::map<std::string, std::string>* identifier_space); |
+ static std::string AnonymizeCustomPatternWithoutContext( |
+ const std::string& input, |
+ const CustomPatternWithoutContext& pattern, |
+ std::map<std::string, std::string>* identifier_space); |
// Map of MAC addresses discovered in anonymized strings to anonymized |
// representations. 11:22:33:44:55:66 gets anonymized to 11:22:33:00:00:01, |
@@ -40,9 +49,11 @@ class AnonymizerTool { |
std::map<std::string, std::string> mac_addresses_; |
// Like mac addresses, identifiers in custom patterns are anonymized. |
- // custom_patterns_[i] contains a map of original identifier to anonymized |
- // identifier for custom pattern number i. |
- std::vector<std::map<std::string, std::string>> custom_patterns_; |
+ // custom_patterns_with_context_[i] contains a map of original identifier to |
+ // anonymized identifier for custom pattern number i. |
+ std::vector<std::map<std::string, std::string>> custom_patterns_with_context_; |
+ std::vector<std::map<std::string, std::string>> |
+ custom_patterns_without_context_; |
DISALLOW_COPY_AND_ASSIGN(AnonymizerTool); |
}; |