| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h" | 5 #include "chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_so
urce.h" | 9 #include "chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_so
urce.h" |
| 10 #include "chrome/browser/feedback/system_logs/log_sources/memory_details_log_sou
rce.h" | 10 #include "chrome/browser/feedback/system_logs/log_sources/memory_details_log_sou
rce.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 data_sources_.push_back(new MemoryDetailsLogSource()); | 28 data_sources_.push_back(new MemoryDetailsLogSource()); |
| 29 | 29 |
| 30 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
| 31 data_sources_.push_back(new CommandLineLogSource()); | 31 data_sources_.push_back(new CommandLineLogSource()); |
| 32 data_sources_.push_back(new DBusLogSource()); | 32 data_sources_.push_back(new DBusLogSource()); |
| 33 data_sources_.push_back(new DeviceEventLogSource()); | 33 data_sources_.push_back(new DeviceEventLogSource()); |
| 34 data_sources_.push_back(new LsbReleaseLogSource()); | 34 data_sources_.push_back(new LsbReleaseLogSource()); |
| 35 data_sources_.push_back(new TouchLogSource()); | 35 data_sources_.push_back(new TouchLogSource()); |
| 36 | 36 |
| 37 // Debug Daemon data source - currently only this data source supports | 37 // Debug Daemon data source - currently only this data source supports |
| 38 // the scrub_data parameter. | 38 // the scrub_data parameter but all others get processed by Rewrite() |
| 39 // as well. |
| 39 const bool scrub_data = true; | 40 const bool scrub_data = true; |
| 40 data_sources_.push_back(new DebugDaemonLogSource(scrub_data)); | 41 data_sources_.push_back(new DebugDaemonLogSource(scrub_data)); |
| 41 #endif | 42 #endif |
| 42 | 43 |
| 43 num_pending_requests_ = data_sources_.size(); | 44 num_pending_requests_ = data_sources_.size(); |
| 44 } | 45 } |
| 45 | 46 |
| 46 ScrubbedSystemLogsFetcher::~ScrubbedSystemLogsFetcher() { | 47 ScrubbedSystemLogsFetcher::~ScrubbedSystemLogsFetcher() { |
| 47 } | 48 } |
| 48 | 49 |
| 50 void ScrubbedSystemLogsFetcher::Rewrite(const std::string& source_name, |
| 51 SystemLogsResponse* response) { |
| 52 for (auto& element : *response) |
| 53 element.second = anonymizer_.Anonymize(element.second); |
| 54 } |
| 55 |
| 49 } // namespace system_logs | 56 } // namespace system_logs |
| OLD | NEW |