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

Unified Diff: chromeos/dbus/debug_daemon_client.cc

Issue 11035014: Collect user logs that debugd can not access (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix indent Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/debug_daemon_client.h ('k') | chromeos/dbus/mock_debug_daemon_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/debug_daemon_client.cc
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index 05d3b394ddce75695455ce808f9ccd1209c04f3f..4bd6464688b4f98275ad61701f178e26b7dc9996 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -246,10 +246,10 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
callback));
}
- virtual void GetAllLogs(const GetAllLogsCallback& callback)
+ virtual void GetAllLogs(const GetLogsCallback& callback)
OVERRIDE {
dbus::MethodCall method_call(debugd::kDebugdInterface,
- "GetAllLogs");
+ debugd::kGetAllLogs);
debugdaemon_proxy_->CallMethod(
&method_call,
dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
@@ -258,6 +258,18 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
callback));
}
+ virtual void GetUserLogFiles(
+ const GetLogsCallback& callback) OVERRIDE {
+ dbus::MethodCall method_call(debugd::kDebugdInterface,
+ debugd::kGetUserLogFiles);
+ debugdaemon_proxy_->CallMethod(
+ &method_call,
+ dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::Bind(&DebugDaemonClientImpl::OnGetUserLogFiles,
+ weak_ptr_factory_.GetWeakPtr(),
+ callback));
+ }
+
virtual void StartSystemTracing() OVERRIDE {
dbus::MethodCall method_call(
debugd::kDebugdInterface,
@@ -395,7 +407,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
}
void OnGetModemStatus(const GetModemStatusCallback& callback,
- dbus::Response* response) {
+ dbus::Response* response) {
std::string status;
if (response && dbus::MessageReader(response).PopString(&status))
callback.Run(true, status);
@@ -412,7 +424,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
callback.Run(false, "");
}
- void OnGetAllLogs(const GetAllLogsCallback& callback,
+ void OnGetAllLogs(const GetLogsCallback& callback,
dbus::Response* response) {
std::map<std::string, std::string> logs;
bool broken = false; // did we see a broken (k,v) pair?
@@ -435,6 +447,11 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
callback.Run(!sub_reader.HasMoreData() && !broken, logs);
}
+ void OnGetUserLogFiles(const GetLogsCallback& callback,
+ dbus::Response* response) {
+ return OnGetAllLogs(callback, response);
+ }
+
// Called when a response for StartSystemTracing() is received.
void OnStartSystemTracing(dbus::Response* response) {
if (!response) {
@@ -536,7 +553,11 @@ class DebugDaemonClientStubImpl : public DebugDaemonClient {
const GetNetworkInterfacesCallback& callback) OVERRIDE {
callback.Run(false, "");
}
- virtual void GetAllLogs(const GetAllLogsCallback& callback) OVERRIDE {
+ virtual void GetAllLogs(const GetLogsCallback& callback) OVERRIDE {
+ std::map<std::string, std::string> empty;
+ callback.Run(false, empty);
+ }
+ virtual void GetUserLogFiles(const GetLogsCallback& callback) OVERRIDE {
std::map<std::string, std::string> empty;
callback.Run(false, empty);
}
« no previous file with comments | « chromeos/dbus/debug_daemon_client.h ('k') | chromeos/dbus/mock_debug_daemon_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698