Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ |
| 6 | #define CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include "chrome/browser/chromeos/system_logs/system_logs_fetcher.h" |
| 11 | #include "chrome/browser/extensions/api/log_private/filter_handler.h" |
| 12 | #include "chrome/browser/extensions/api/log_private/log_parser.h" |
| 13 | #include "chrome/browser/extensions/extension_function.h" |
| 14 | #include "chrome/common/extensions/api/log_private.h" |
| 15 | |
| 16 | namespace extensions { |
| 17 | |
| 18 | class LogPrivateGetHistoricalFunction : public AsyncExtensionFunction { |
| 19 | public: |
| 20 | LogPrivateGetHistoricalFunction(); |
| 21 | DECLARE_EXTENSION_FUNCTION("logPrivate.getHistorical", |
| 22 | LOGPRIVATE_GETHISTORICAL); |
| 23 | |
| 24 | protected: |
| 25 | virtual ~LogPrivateGetHistoricalFunction(); |
| 26 | virtual bool RunImpl() OVERRIDE; |
| 27 | |
| 28 | private: |
| 29 | void OnSystemLogsLoaded(scoped_ptr<chromeos::SystemLogsResponse> sys_info); |
| 30 | |
| 31 | scoped_ptr<FilterHandler> filter_handler_; |
| 32 | |
| 33 | DISALLOW_COPY_AND_ASSIGN(LogPrivateGetHistoricalFunction); |
| 34 | }; |
| 35 | |
| 36 | } // namespace extensions |
| 37 | |
| 38 | #endif // CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ |