diff options
author | vapier@chromium.org <vapier@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-02 04:21:54 +0000 |
---|---|---|
committer | vapier@chromium.org <vapier@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-02 04:21:54 +0000 |
commit | 77a009fe23ae27f1f3f1f30891a1fffc9642f8d5 (patch) | |
tree | 4bfe2af18a4265b8ca63a920142a00e6521d2944 /chromeos | |
parent | 70b0ca04d7be43fa6cdf835e3425154123aea789 (diff) | |
download | chromium_src-77a009fe23ae27f1f3f1f30891a1fffc9642f8d5.zip chromium_src-77a009fe23ae27f1f3f1f30891a1fffc9642f8d5.tar.gz chromium_src-77a009fe23ae27f1f3f1f30891a1fffc9642f8d5.tar.bz2 |
chrome://crashes: add a link on CrOS for triggering crash uploading
The CrOS crash page is not clear in terms of when crashes will be uploaded.
Add a link so people can click to automatically trigger the system.
BUG=chromium:210624
TEST=loaded on a new system, went to chrome://crashes, clicked new link and saw system crash reporter run
Review URL: https://codereview.chromium.org/26536002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261068 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r-- | chromeos/dbus/debug_daemon_client.cc | 18 | ||||
-rw-r--r-- | chromeos/dbus/debug_daemon_client.h | 3 | ||||
-rw-r--r-- | chromeos/dbus/fake_debug_daemon_client.cc | 3 | ||||
-rw-r--r-- | chromeos/dbus/fake_debug_daemon_client.h | 1 |
4 files changed, 21 insertions, 4 deletions
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc index 25a55e3..6c377ae 100644 --- a/chromeos/dbus/debug_daemon_client.cc +++ b/chromeos/dbus/debug_daemon_client.cc @@ -313,7 +313,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { debugdaemon_proxy_->CallMethod( &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, - base::Bind(&DebugDaemonClientImpl::OnStartSystemTracing, + base::Bind(&DebugDaemonClientImpl::OnStartMethod, weak_ptr_factory_.GetWeakPtr())); } @@ -400,6 +400,16 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } + virtual void UploadCrashes() OVERRIDE { + dbus::MethodCall method_call(debugd::kDebugdInterface, + debugd::kUploadCrashes); + debugdaemon_proxy_->CallMethod( + &method_call, + dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, + base::Bind(&DebugDaemonClientImpl::OnStartMethod, + weak_ptr_factory_.GetWeakPtr())); + } + protected: virtual void Init(dbus::Bus* bus) OVERRIDE { debugdaemon_proxy_ = @@ -553,10 +563,10 @@ class DebugDaemonClientImpl : public DebugDaemonClient { return OnGetAllLogs(callback, response); } - // Called when a response for StartSystemTracing() is received. - void OnStartSystemTracing(dbus::Response* response) { + // Called when a response for a simple start is received. + void OnStartMethod(dbus::Response* response) { if (!response) { - LOG(ERROR) << "Failed to request systrace start"; + LOG(ERROR) << "Failed to request start"; return; } } diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h index 871f8b2..fd1da9d 100644 --- a/chromeos/dbus/debug_daemon_client.h +++ b/chromeos/dbus/debug_daemon_client.h @@ -140,6 +140,9 @@ class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient { const std::map<std::string, std::string>& options, const TestICMPCallback& callback) = 0; + // Trigger uploading of crashes. + virtual void UploadCrashes() = 0; + // Factory function, creates a new instance and returns ownership. // For normal usage, access the singleton via DBusThreadManager::Get(). static DebugDaemonClient* Create(); diff --git a/chromeos/dbus/fake_debug_daemon_client.cc b/chromeos/dbus/fake_debug_daemon_client.cc index 45ab451..09523ee 100644 --- a/chromeos/dbus/fake_debug_daemon_client.cc +++ b/chromeos/dbus/fake_debug_daemon_client.cc @@ -113,4 +113,7 @@ void FakeDebugDaemonClient::TestICMPWithOptions( base::Bind(callback, false, "")); } +void FakeDebugDaemonClient::UploadCrashes() { +} + } // namespace chromeos diff --git a/chromeos/dbus/fake_debug_daemon_client.h b/chromeos/dbus/fake_debug_daemon_client.h index 56c208c..6455d20 100644 --- a/chromeos/dbus/fake_debug_daemon_client.h +++ b/chromeos/dbus/fake_debug_daemon_client.h @@ -46,6 +46,7 @@ class FakeDebugDaemonClient : public DebugDaemonClient { const std::string& ip_address, const std::map<std::string, std::string>& options, const TestICMPCallback& callback) OVERRIDE; + virtual void UploadCrashes() OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(FakeDebugDaemonClient); |