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

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

Issue 10829396: debugd: Add TestICMP functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: |host| -> |ip_address|; fix nits. Created 8 years, 4 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
« no previous file with comments | « no previous file | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 typedef base::Callback<void(const scoped_refptr<base::RefCountedString>& 89 typedef base::Callback<void(const scoped_refptr<base::RefCountedString>&
90 result)> StopSystemTracingCallback; 90 result)> StopSystemTracingCallback;
91 91
92 // Requests to stop system tracing and calls |callback| when completed. 92 // Requests to stop system tracing and calls |callback| when completed.
93 virtual bool RequestStopSystemTracing(const StopSystemTracingCallback& 93 virtual bool RequestStopSystemTracing(const StopSystemTracingCallback&
94 callback) = 0; 94 callback) = 0;
95 95
96 // Returns an empty SystemTracingCallback that does nothing. 96 // Returns an empty SystemTracingCallback that does nothing.
97 static StopSystemTracingCallback EmptyStopSystemTracingCallback(); 97 static StopSystemTracingCallback EmptyStopSystemTracingCallback();
98 98
99 // Called once TestICMP() is complete. Takes two parameters:
100 // - succeeded: information was obtained successfully.
101 // - status: information about ICMP connectivity to a specified host as json.
102 // For details please refer to
103 // https://gerrit.chromium.org/gerrit/#/c/30310/2/src/helpers/icmp.cc
104 typedef base::Callback<void(bool succeeded, const std::string& status)>
105 TestICMPCallback;
106
107 // Tests ICMP connectivity to a specified host. The |ip_address| contains the
108 // IPv4 or IPv6 address of the host, for example "8.8.8.8".
109 virtual void TestICMP(const std::string& ip_address,
110 const TestICMPCallback& callback) = 0;
111
99 // Factory function, creates a new instance and returns ownership. 112 // Factory function, creates a new instance and returns ownership.
100 // For normal usage, access the singleton via DBusThreadManager::Get(). 113 // For normal usage, access the singleton via DBusThreadManager::Get().
101 static DebugDaemonClient* Create(DBusClientImplementationType type, 114 static DebugDaemonClient* Create(DBusClientImplementationType type,
102 dbus::Bus* bus); 115 dbus::Bus* bus);
103 protected: 116 protected:
104 // Create() should be used instead. 117 // Create() should be used instead.
105 DebugDaemonClient(); 118 DebugDaemonClient();
106 119
107 private: 120 private:
108 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); 121 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient);
109 }; 122 };
110 123
111 } // namespace chromeos 124 } // namespace chromeos
112 125
113 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ 126 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698