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

Unified Diff: chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc

Issue 1530403003: Add anonymizer tool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved location of scrubbing Created 5 years 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: chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc
diff --git a/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc b/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc
index 7b3f442c0e8816e3255a9c7a35251f16f43f3f82..ea3a002bdb23216bd6ecf117c8784ca4704d4443 100644
--- a/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc
+++ b/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc
@@ -35,7 +35,8 @@ ScrubbedSystemLogsFetcher::ScrubbedSystemLogsFetcher() {
data_sources_.push_back(new TouchLogSource());
// Debug Daemon data source - currently only this data source supports
- // the scrub_data parameter.
+ // the scrub_data parameter but all others get processed by Rewrite()
+ // as well.
const bool scrub_data = true;
data_sources_.push_back(new DebugDaemonLogSource(scrub_data));
#endif
@@ -46,4 +47,10 @@ ScrubbedSystemLogsFetcher::ScrubbedSystemLogsFetcher() {
ScrubbedSystemLogsFetcher::~ScrubbedSystemLogsFetcher() {
}
+void ScrubbedSystemLogsFetcher::Rewrite(const std::string& source_name,
+ SystemLogsResponse* response) {
+ for (auto& element : *response)
+ element.second = anonymizer_.Anonymize(element.second);
+}
+
} // namespace system_logs

Powered by Google App Engine
This is Rietveld 408576698