Chromium Code Reviews| Index: chrome/browser/chromeos/system_logs/debug_log_writer.h |
| diff --git a/chrome/browser/chromeos/system_logs/debug_log_writer.h b/chrome/browser/chromeos/system_logs/debug_log_writer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..054460a904498b8b3a7a3e78b127898717bb40de |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/system_logs/debug_log_writer.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
|
Zachary Kuznia
2014/06/25 00:05:53
Nit: no (c)
zel
2014/06/27 19:31:00
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
|
Zachary Kuznia
2014/06/25 00:05:53
nit: empty line before ifndef
zel
2014/06/27 19:31:01
Done.
|
| +#ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_ |
| +#define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/callback.h" |
| +#include "base/files/file_path.h" |
| + |
| +namespace chromeos { |
| + |
| +class DebugLogWriter { |
| +public: |
| + // Called once StoreDebugLogs is complete. Takes two parameters: |
|
xiaowenx
2014/06/25 05:30:44
The function is called "StoreLogs", not "StoreDebu
zel
2014/06/27 19:31:01
Done.
|
| + // - log_path: where the log file was saved in the case of success; |
| + // - succeeded: was the log file saved successfully. |
| + typedef base::Callback<void(const base::FilePath& log_path, |
| + bool succeded)> StoreDebugLogsCallback; |
|
Zachary Kuznia
2014/06/25 00:05:53
s/succeded/succeeded/
zel
2014/06/27 19:31:00
Done.
|
| + |
| + // Stores debug logs in the .tgz archive on the |fileshelf|. The file |
| + // is created on the worker pool, then writing to it is triggered from |
| + // the UI thread, and finally it is closed (on success) or deleted (on |
| + // failure) on the worker pool, prior to calling |callback|. |
| + static void StoreLogs(const base::FilePath& fileshelf, |
| + const StoreDebugLogsCallback& callback); |
| + |
| +private: |
| + DebugLogWriter(); |
| + DISALLOW_COPY_AND_ASSIGN(DebugLogWriter); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_ |