| /* |
| * |
| * Copyright (c) 2017 Nest Labs, Inc. |
| * All rights reserved. |
| * |
| * This document is the property of Nest. It is considered |
| * confidential and proprietary information. |
| * |
| * This document may not be reproduced or transmitted in any form, |
| * in whole or in part, without the express written permission of |
| * Nest. |
| * |
| */ |
| |
| #ifndef CRASH_REPORTER_LOGCAT_READER_H |
| #define CRASH_REPORTER_LOGCAT_READER_H |
| |
| #include <memory> |
| #include <base/files/file_path.h> |
| |
| // Utility class to read lines from logcat into a file. |
| class LogcatReader { |
| public: |
| LogcatReader(); |
| |
| bool Initialize(const std::string &log_name, |
| unsigned int tail_num_lines); |
| |
| size_t DumpLogToFile(const base::FilePath &target_file_path); |
| |
| private: |
| struct LogcatImpl; |
| std::shared_ptr<LogcatImpl> impl; |
| }; |
| |
| #endif |