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"; | |
hashimoto
2012/11/13 06:11:44
nit: s/Dbus/DBus/
stevenjb
2012/11/13 19:54:15
Done.
| |
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 |