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

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: Fix copy/paste error in comment; emplace into map; ASSERT_EQ for size of response 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 SysLogsSourceCallback& callback,
35 bool success,
36 const std::map<std::string, std::string>& result) const;
37
38 base::WeakPtrFactory<SingleDebugDaemonLogSource> weak_ptr_factory_;
39
40 DISALLOW_COPY_AND_ASSIGN(SingleDebugDaemonLogSource);
41 };
42
43 } // namespace system_logs
44
45 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_LOGS_SINGLE_DEBUG_DAEMON_LOG_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698