Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // 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.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // 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.
| |
| 4 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_ | |
| 5 #define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_ | |
| 6 | |
| 7 #include "base/basictypes.h" | |
| 8 #include "base/callback.h" | |
| 9 #include "base/files/file_path.h" | |
| 10 | |
| 11 namespace chromeos { | |
| 12 | |
| 13 class DebugLogWriter { | |
| 14 public: | |
| 15 // 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.
| |
| 16 // - log_path: where the log file was saved in the case of success; | |
| 17 // - succeeded: was the log file saved successfully. | |
| 18 typedef base::Callback<void(const base::FilePath& log_path, | |
| 19 bool succeded)> StoreDebugLogsCallback; | |
|
Zachary Kuznia
2014/06/25 00:05:53
s/succeded/succeeded/
zel
2014/06/27 19:31:00
Done.
| |
| 20 | |
| 21 // Stores debug logs in the .tgz archive on the |fileshelf|. The file | |
| 22 // is created on the worker pool, then writing to it is triggered from | |
| 23 // the UI thread, and finally it is closed (on success) or deleted (on | |
| 24 // failure) on the worker pool, prior to calling |callback|. | |
| 25 static void StoreLogs(const base::FilePath& fileshelf, | |
| 26 const StoreDebugLogsCallback& callback); | |
| 27 | |
| 28 private: | |
| 29 DebugLogWriter(); | |
| 30 DISALLOW_COPY_AND_ASSIGN(DebugLogWriter); | |
| 31 }; | |
| 32 | |
| 33 } // namespace chromeos | |
| 34 | |
| 35 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_ | |
| OLD | NEW |