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

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: . 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 "base/message_loop.h"
hashimoto 2012/11/12 04:33:16 nit: No need to include this.
stevenjb 2012/11/12 19:46:40 Done.
8 #include "chrome/browser/chromeos/system_logs/system_logs_fetcher.h"
9 #include "content/public/browser/browser_thread.h"
10 #include "dbus/dbus_statistics.h"
11
12 namespace chromeos {
13
14 namespace {
15 const char kDbusLogEntryShort[] = "dbus_summary";
16 const char kDbusLogEntryLong[] = "dbus_details";
17 }
hashimoto 2012/11/12 04:33:16 nit: Add commenct "// namespace"
stevenjb 2012/11/12 19:46:40 We usually don't bother when it's within a few lin
18
19 void DbusLogSource::Fetch(const SysLogsSourceCallback& callback) {
20 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
21 DCHECK(!callback.is_null());
22
23 scoped_ptr<SystemLogsResponse> response(new SystemLogsResponse);
hashimoto 2012/11/12 04:33:16 Why do you store this object in scoped_ptr? Doesn'
stevenjb 2012/11/12 19:46:40 Yes actually, it looks like it can. The code that
24 const bool show_per_minute = true;
25 (*response)[kDbusLogEntryShort] =
26 dbus::DbusStatistics::GetAsString(
27 dbus::DbusStatistics::SHOW_INTERFACE, show_per_minute);
28 (*response)[kDbusLogEntryLong] =
29 dbus::DbusStatistics::GetAsString(
30 dbus::DbusStatistics::SHOW_METHOD, !show_per_minute);
31 callback.Run(response.get());
32 }
33
34 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698