OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/feedback/anonymizer_tool.h" | 5 #include "components/feedback/anonymizer_tool.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 | |
13 #include "third_party/re2/src/re2/re2.h" | 12 #include "third_party/re2/src/re2/re2.h" |
14 | 13 |
15 using re2::RE2; | 14 using re2::RE2; |
16 | 15 |
17 namespace feedback { | 16 namespace feedback { |
18 | 17 |
19 namespace { | 18 namespace { |
20 | 19 |
21 // The |kCustomPatternsWithContext| array defines patterns to match and | 20 // The |kCustomPatternsWithContext| array defines patterns to match and |
22 // anonymize. Each pattern needs to define three capturing parentheses groups: | 21 // anonymize. Each pattern needs to define three capturing parentheses groups: |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 } | 363 } |
365 | 364 |
366 skipped.AppendToString(&result); | 365 skipped.AppendToString(&result); |
367 result += replacement_id; | 366 result += replacement_id; |
368 } | 367 } |
369 text.AppendToString(&result); | 368 text.AppendToString(&result); |
370 return result; | 369 return result; |
371 } | 370 } |
372 | 371 |
373 } // namespace feedback | 372 } // namespace feedback |
OLD | NEW |