Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/browser/chromeos/system_logs/debug_log_writer.h

Issue 329853010: Additional methods for chrome.logPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_
7
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "base/files/file_path.h"
11
12 namespace chromeos {
13
14 class DebugLogWriter {
15 public:
16 // Called once StoreDebugLogs is complete. Takes two parameters:
17 // - log_path: where the log file was saved in the case of success;
18 // - succeeded: was the log file saved successfully.
19 typedef base::Callback<void(const base::FilePath& log_path,
20 bool succeeded)> StoreLogsCallback;
21
22 // Stores debug logs in the .tgz archive on the |fileshelf|. The file
23 // is created on the worker pool, then writing to it is triggered from
24 // the UI thread, and finally it is closed (on success) or deleted (on
25 // failure) on the worker pool, prior to calling |callback|.
26 static void StoreLogs(const base::FilePath& fileshelf,
27 const StoreLogsCallback& callback);
28
29 private:
30 DebugLogWriter();
31 DISALLOW_COPY_AND_ASSIGN(DebugLogWriter);
32 };
33
34 } // namespace chromeos
35
36 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_DEBUG_LOG_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698