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

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

Issue 1049873005: [chrome/browser/chromeos/] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/system_logs/dbus_log_source.h" 5 #include "chrome/browser/chromeos/system_logs/dbus_log_source.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "dbus/dbus_statistics.h" 8 #include "dbus/dbus_statistics.h"
9 9
10 const char kDBusLogEntryShort[] = "dbus_summary"; 10 const char kDBusLogEntryShort[] = "dbus_summary";
11 const char kDBusLogEntryLong[] = "dbus_details"; 11 const char kDBusLogEntryLong[] = "dbus_details";
12 12
13 namespace system_logs { 13 namespace system_logs {
14 14
15 DBusLogSource::DBusLogSource() : SystemLogsSource("DBus") { 15 DBusLogSource::DBusLogSource() : SystemLogsSource("DBus") {
16 } 16 }
17 17
18 DBusLogSource::~DBusLogSource() { 18 DBusLogSource::~DBusLogSource() {
19 } 19 }
20 20
21 void DBusLogSource::Fetch(const SysLogsSourceCallback& callback) { 21 void DBusLogSource::Fetch(const SysLogsSourceCallback& callback) {
22 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 22 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
23 DCHECK(!callback.is_null()); 23 DCHECK(!callback.is_null());
24 24
25 SystemLogsResponse response; 25 SystemLogsResponse response;
26 response[kDBusLogEntryShort] = dbus::statistics::GetAsString( 26 response[kDBusLogEntryShort] = dbus::statistics::GetAsString(
27 dbus::statistics::SHOW_INTERFACE, 27 dbus::statistics::SHOW_INTERFACE,
28 dbus::statistics::FORMAT_ALL); 28 dbus::statistics::FORMAT_ALL);
29 response[kDBusLogEntryLong] = dbus::statistics::GetAsString( 29 response[kDBusLogEntryLong] = dbus::statistics::GetAsString(
30 dbus::statistics::SHOW_METHOD, 30 dbus::statistics::SHOW_METHOD,
31 dbus::statistics::FORMAT_TOTALS); 31 dbus::statistics::FORMAT_TOTALS);
32 callback.Run(&response); 32 callback.Run(&response);
33 } 33 }
34 34
35 } // namespace system_logs 35 } // namespace system_logs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698