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

Side by Side Diff: chromeos/dbus/debug_daemon_client.h

Issue 270853002: Use base::File for DebugDaemonClient::GetDebugLogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ 6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file.h"
9 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
10 #include "base/platform_file.h"
11 #include "chromeos/chromeos_export.h" 11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/dbus/dbus_client.h" 12 #include "chromeos/dbus/dbus_client.h"
13 13
14 #include <map> 14 #include <map>
15 15
16 namespace metrics { 16 namespace metrics {
17 class PerfDataProto; 17 class PerfDataProto;
18 } 18 }
19 19
20 namespace chromeos { 20 namespace chromeos {
21 21
22 // DebugDaemonClient is used to communicate with the debug daemon. 22 // DebugDaemonClient is used to communicate with the debug daemon.
23 class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient { 23 class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient {
24 public: 24 public:
25 virtual ~DebugDaemonClient(); 25 virtual ~DebugDaemonClient();
26 26
27 // Called once GetDebugLogs() is complete. Takes one parameter: 27 // Called once GetDebugLogs() is complete. Takes one parameter:
28 // - succeeded: was the logs stored successfully. 28 // - succeeded: was the logs stored successfully.
29 typedef base::Callback<void(bool succeeded)> GetDebugLogsCallback; 29 typedef base::Callback<void(bool succeeded)> GetDebugLogsCallback;
30 30
31 // Requests to store debug logs into |file| and calls |callback| 31 // Requests to store debug logs into |file| and calls |callback|
32 // when completed. Debug logs will be stored in the .tgz format. 32 // when completed. Debug logs will be stored in the .tgz format.
33 virtual void GetDebugLogs(base::PlatformFile file, 33 virtual void GetDebugLogs(base::File file,
34 const GetDebugLogsCallback& callback) = 0; 34 const GetDebugLogsCallback& callback) = 0;
35 35
36 // Called once SetDebugMode() is complete. Takes one parameter: 36 // Called once SetDebugMode() is complete. Takes one parameter:
37 // - succeeded: debug mode was changed successfully. 37 // - succeeded: debug mode was changed successfully.
38 typedef base::Callback<void(bool succeeded)> SetDebugModeCallback; 38 typedef base::Callback<void(bool succeeded)> SetDebugModeCallback;
39 39
40 // Requests to change debug mode to given |subsystem| and calls 40 // Requests to change debug mode to given |subsystem| and calls
41 // |callback| when completed. |subsystem| should be one of the 41 // |callback| when completed. |subsystem| should be one of the
42 // following: "wifi", "ethernet", "cellular" or "none". 42 // following: "wifi", "ethernet", "cellular" or "none".
43 virtual void SetDebugMode(const std::string& subsystem, 43 virtual void SetDebugMode(const std::string& subsystem,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Create() should be used instead. 151 // Create() should be used instead.
152 DebugDaemonClient(); 152 DebugDaemonClient();
153 153
154 private: 154 private:
155 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); 155 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient);
156 }; 156 };
157 157
158 } // namespace chromeos 158 } // namespace chromeos
159 159
160 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ 160 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698