Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / system_logs / dbus_log_source.cc
blob57d97e8e87748a44149772d0e21fbed3e2136112
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.
5 #include "chrome/browser/chromeos/system_logs/dbus_log_source.h"
7 #include "content/public/browser/browser_thread.h"
8 #include "dbus/dbus_statistics.h"
10 const char kDBusLogEntryShort[] = "dbus_summary";
11 const char kDBusLogEntryLong[] = "dbus_details";
13 namespace system_logs {
15 void DBusLogSource::Fetch(const SysLogsSourceCallback& callback) {
16 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
17 DCHECK(!callback.is_null());
19 SystemLogsResponse response;
20 response[kDBusLogEntryShort] = dbus::statistics::GetAsString(
21 dbus::statistics::SHOW_INTERFACE,
22 dbus::statistics::FORMAT_ALL);
23 response[kDBusLogEntryLong] = dbus::statistics::GetAsString(
24 dbus::statistics::SHOW_METHOD,
25 dbus::statistics::FORMAT_TOTALS);
26 callback.Run(&response);
29 } // namespace system_logs