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

Unified Diff: metrics_daemon.cc

Issue 2693001: Cleanup style nits in metrics daemon. (Closed) Base URL: ssh://git@chromiumos-git/metrics.git
Patch Set: Fix more nits from tfarina Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | metrics_daemon_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: metrics_daemon.cc
diff --git a/metrics_daemon.cc b/metrics_daemon.cc
index 523d8bd215821e3c5b1606be760a5bd9782056a2..04ad68631d5249aef47ba98f116a1567803cc10d 100644
--- a/metrics_daemon.cc
+++ b/metrics_daemon.cc
@@ -125,14 +125,14 @@ void MetricsDaemon::Init(bool testing, MetricsLibraryInterface* metrics_lib) {
DBusError error;
dbus_error_init(&error);
- DBusConnection *connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
+ DBusConnection* connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
LOG_IF(FATAL, dbus_error_is_set(&error)) <<
"No D-Bus connection: " << SAFE_MESSAGE(error);
dbus_connection_setup_with_g_main(connection, NULL);
// Registers D-Bus matches for the signals we would like to catch.
- for (unsigned int m = 0; m < sizeof(kDBusMatches_) / sizeof(char *); m++) {
+ for (unsigned int m = 0; m < sizeof(kDBusMatches_) / sizeof(char*); m++) {
const char* match = kDBusMatches_[m];
DLOG(INFO) << "adding dbus match: " << match;
dbus_bus_add_match(connection, match, &error);
@@ -177,28 +177,28 @@ DBusHandlerResult MetricsDaemon::MessageFilter(DBusConnection* connection,
CHECK(strcmp(dbus_message_get_member(message),
"StateChanged") == 0);
- char *state_name;
+ char* state_name;
dbus_message_iter_get_basic(&iter, &state_name);
daemon->NetStateChanged(state_name, ticks);
} else if (strcmp(interface, DBUS_IFACE_POWER_MANAGER) == 0) {
CHECK(strcmp(dbus_message_get_member(message),
"PowerStateChanged") == 0);
- char *state_name;
+ char* state_name;
dbus_message_iter_get_basic(&iter, &state_name);
daemon->PowerStateChanged(state_name, now);
} else if (strcmp(interface, DBUS_IFACE_SCREENSAVER_MANAGER) == 0) {
CHECK(strcmp(dbus_message_get_member(message),
"LockStateChanged") == 0);
- char *state_name;
+ char* state_name;
dbus_message_iter_get_basic(&iter, &state_name);
daemon->ScreenSaverStateChanged(state_name, now);
} else if (strcmp(interface, DBUS_IFACE_SESSION_MANAGER) == 0) {
CHECK(strcmp(dbus_message_get_member(message),
"SessionStateChanged") == 0);
- char *state_name;
+ char* state_name;
dbus_message_iter_get_basic(&iter, &state_name);
daemon->SessionStateChanged(state_name, now);
} else {
« no previous file with comments | « no previous file | metrics_daemon_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698