| 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..a5e8cb058d2506818b2a0698232ff797d0654d51
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/system_logs/debug_log_writer.h
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#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:
|
| + // - 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 succeeded)> StoreLogsCallback;
|
| +
|
| + // 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 StoreLogsCallback& callback);
|
| +
|
| +private:
|
| + DebugLogWriter();
|
| + DISALLOW_COPY_AND_ASSIGN(DebugLogWriter);
|
| +};
|
| +
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_
|
|
|