| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 #ifndef METRICS_DAEMON_H_ | 5 #ifndef METRICS_DAEMON_H_ |
| 6 #define METRICS_DAEMON_H_ | 6 #define METRICS_DAEMON_H_ |
| 7 | 7 |
| 8 #include <dbus/dbus.h> | 8 #include <dbus/dbus.h> |
| 9 #include <glib.h> | 9 #include <glib.h> |
| 10 #include <time.h> | 10 #include <time.h> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // forking. | 32 // forking. |
| 33 void Run(bool run_as_daemon); | 33 void Run(bool run_as_daemon); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 friend class MetricsDaemonTest; | 36 friend class MetricsDaemonTest; |
| 37 FRIEND_TEST(MetricsDaemonTest, LogDailyUseRecord); | 37 FRIEND_TEST(MetricsDaemonTest, LogDailyUseRecord); |
| 38 FRIEND_TEST(MetricsDaemonTest, LookupNetworkState); | 38 FRIEND_TEST(MetricsDaemonTest, LookupNetworkState); |
| 39 FRIEND_TEST(MetricsDaemonTest, LookupPowerState); | 39 FRIEND_TEST(MetricsDaemonTest, LookupPowerState); |
| 40 FRIEND_TEST(MetricsDaemonTest, LookupScreenSaverState); | 40 FRIEND_TEST(MetricsDaemonTest, LookupScreenSaverState); |
| 41 FRIEND_TEST(MetricsDaemonTest, LookupSessionState); | 41 FRIEND_TEST(MetricsDaemonTest, LookupSessionState); |
| 42 FRIEND_TEST(MetricsDaemonTest, MessageFilter); |
| 42 FRIEND_TEST(MetricsDaemonTest, NetStateChanged); | 43 FRIEND_TEST(MetricsDaemonTest, NetStateChanged); |
| 43 FRIEND_TEST(MetricsDaemonTest, PowerStateChanged); | 44 FRIEND_TEST(MetricsDaemonTest, PowerStateChanged); |
| 44 FRIEND_TEST(MetricsDaemonTest, PublishMetric); | 45 FRIEND_TEST(MetricsDaemonTest, PublishMetric); |
| 45 FRIEND_TEST(MetricsDaemonTest, ScreenSaverStateChanged); | 46 FRIEND_TEST(MetricsDaemonTest, ScreenSaverStateChanged); |
| 46 FRIEND_TEST(MetricsDaemonTest, SessionStateChanged); | 47 FRIEND_TEST(MetricsDaemonTest, SessionStateChanged); |
| 47 FRIEND_TEST(MetricsDaemonTest, SetUserActiveState); | 48 FRIEND_TEST(MetricsDaemonTest, SetUserActiveState); |
| 48 | 49 |
| 49 // The network states (see network_states.h). | 50 // The network states (see network_states.h). |
| 50 enum NetworkState { | 51 enum NetworkState { |
| 51 kUnknownNetworkState = -1, // Initial/unknown network state. | 52 kUnknownNetworkState = -1, // Initial/unknown network state. |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 219 |
| 219 // Sleep period until the next daily usage aggregation performed by | 220 // Sleep period until the next daily usage aggregation performed by |
| 220 // the daily use monitor (see ScheduleUseMonitor). | 221 // the daily use monitor (see ScheduleUseMonitor). |
| 221 int usemon_interval_; | 222 int usemon_interval_; |
| 222 | 223 |
| 223 // Scheduled daily use monitor source (see ScheduleUseMonitor). | 224 // Scheduled daily use monitor source (see ScheduleUseMonitor). |
| 224 GSource* usemon_source_; | 225 GSource* usemon_source_; |
| 225 }; | 226 }; |
| 226 | 227 |
| 227 #endif // METRICS_DAEMON_H_ | 228 #endif // METRICS_DAEMON_H_ |
| OLD | NEW |