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

Side by Side Diff: chrome/browser/chromeos/system_logs/dbus_log_source.cc

Issue 11363173: Add DBusStatistics and DBusLogSource to log and show dbus stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698