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

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

Issue 2955463002: Add log source to read from one DebugDaemon log (Closed)
Patch Set: Rebased: updated to latest DebugDaemonClient; Browser thread bundle Created 3 years, 6 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 2017 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_SINGLE_DEBUG_DAEMON_LOG_SOURCE_H_
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_DEBUG_DAEMON_LOG_SOURCE_H_
7
8 #include <stddef.h>
9
10 #include "base/macros.h"
11 #include "chrome/browser/feedback/system_logs/system_logs_fetcher.h"
12
13 namespace system_logs {
14
15 // Gathers log data from a single debugd log source, via DebugDaemonClient.
16 class SingleDebugDaemonLogSource : public SystemLogsSource {
17 public:
18 enum class SupportedSource {
19 // For "modetest" command.
20 kModetest,
21
22 // For "lsusb" command.
23 kLsusb,
24 };
25
26 explicit SingleDebugDaemonLogSource(SupportedSource source);
27 ~SingleDebugDaemonLogSource() override;
28
29 // system_logs::SystemLogsSource:
30 void Fetch(const SysLogsSourceCallback& callback) override;
31
32 private:
33 // Callback for handling response from DebugDaemonClient.
34 void OnFetchComplete(const std::string& log_name,
35 const SysLogsSourceCallback& callback,
36 bool success,
37 const std::string& result) const;
38
39 base::WeakPtrFactory<SingleDebugDaemonLogSource> weak_ptr_factory_;
40
41 DISALLOW_COPY_AND_ASSIGN(SingleDebugDaemonLogSource);
42 };
43
44 } // namespace system_logs
45
46 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_DEBUG_DAEMON_LOG_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/system_logs/single_debug_daemon_log_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698