OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/chromeos/system_logs/dbus_log_source.h" |
| 6 |
| 7 #include "chrome/browser/chromeos/system_logs/system_logs_fetcher.h" |
| 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "dbus/dbus_statistics.h" |
| 10 |
| 11 namespace chromeos { |
| 12 |
| 13 namespace { |
| 14 const char kDBusLogEntryShort[] = "dbus_summary"; |
| 15 const char kDBusLogEntryLong[] = "dbus_details"; |
| 16 } |
| 17 |
| 18 void DBusLogSource::Fetch(const SysLogsSourceCallback& callback) { |
| 19 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 20 DCHECK(!callback.is_null()); |
| 21 |
| 22 SystemLogsResponse response; |
| 23 response[kDBusLogEntryShort] = dbus::statistics::GetAsString( |
| 24 dbus::statistics::SHOW_INTERFACE, |
| 25 dbus::statistics::FORMAT_ALL); |
| 26 response[kDBusLogEntryLong] = dbus::statistics::GetAsString( |
| 27 dbus::statistics::SHOW_METHOD, |
| 28 dbus::statistics::FORMAT_TOTALS); |
| 29 callback.Run(&response); |
| 30 } |
| 31 |
| 32 } // namespace chromeos |
OLD | NEW |