| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_LOG_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_LOG_SOURCE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_LOG_SOURCE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_LOG_SOURCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // system_logs::SystemLogsSource: | 31 // system_logs::SystemLogsSource: |
| 32 void Fetch(const SysLogsSourceCallback& callback) override; | 32 void Fetch(const SysLogsSourceCallback& callback) override; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 friend class SingleLogSourceTest; | 35 friend class SingleLogSourceTest; |
| 36 | 36 |
| 37 // Reads all available content from |file_| that has not already been read. | 37 // Reads all available content from |file_| that has not already been read. |
| 38 void ReadFile(SystemLogsResponse* result); | 38 void ReadFile(SystemLogsResponse* result); |
| 39 | 39 |
| 40 // Path to system log file directory. |
| 41 base::FilePath log_file_dir_path_; |
| 42 |
| 40 // Keeps track of how much data has been read from |file_|. | 43 // Keeps track of how much data has been read from |file_|. |
| 41 size_t num_bytes_read_; | 44 size_t num_bytes_read_; |
| 42 | 45 |
| 43 // Handle for reading the log file that is source of logging data. | 46 // Handle for reading the log file that is source of logging data. |
| 44 base::File file_; | 47 base::File file_; |
| 45 | 48 |
| 46 // For removing PII from log results. | 49 // For removing PII from log results. |
| 47 feedback::AnonymizerTool anonymizer_; | 50 feedback::AnonymizerTool anonymizer_; |
| 48 | 51 |
| 49 base::WeakPtrFactory<SingleLogSource> weak_ptr_factory_; | 52 base::WeakPtrFactory<SingleLogSource> weak_ptr_factory_; |
| 50 | 53 |
| 51 DISALLOW_COPY_AND_ASSIGN(SingleLogSource); | 54 DISALLOW_COPY_AND_ASSIGN(SingleLogSource); |
| 52 }; | 55 }; |
| 53 | 56 |
| 54 } // namespace system_logs | 57 } // namespace system_logs |
| 55 | 58 |
| 56 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_LOG_SOURCE_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_LOG_SOURCE_H_ |
| OLD | NEW |