| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_DEVICE_EVENT_LOG_DEVICE_EVENT_LOG_H_ | 5 #ifndef COMPONENTS_DEVICE_EVENT_LOG_DEVICE_EVENT_LOG_H_ |
| 6 #define COMPONENTS_DEVICE_EVENT_LOG_DEVICE_EVENT_LOG_H_ | 6 #define COMPONENTS_DEVICE_EVENT_LOG_DEVICE_EVENT_LOG_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <cstring> | 10 #include <cstring> |
| 9 #include <sstream> | 11 #include <sstream> |
| 10 | 12 |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" |
| 13 #include "base/timer/elapsed_timer.h" | 15 #include "base/timer/elapsed_timer.h" |
| 14 #include "components/device_event_log/device_event_log_export.h" | 16 #include "components/device_event_log/device_event_log_export.h" |
| 15 | 17 |
| 16 // These macros can be used to log device related events. | 18 // These macros can be used to log device related events. |
| 17 // | 19 // |
| 18 // NOTE: If these macros are called from a thread other than the thread that | 20 // NOTE: If these macros are called from a thread other than the thread that |
| 19 // device_event_log::Initialize() was called from (i.e. the UI thread), a task | 21 // device_event_log::Initialize() was called from (i.e. the UI thread), a task |
| 20 // will be posted to the UI thread to log the event. | 22 // will be posted to the UI thread to log the event. |
| 21 // | 23 // |
| 22 // The following values should be used for |level| in these macros: | 24 // The following values should be used for |level| in these macros: |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 LogType type_; | 220 LogType type_; |
| 219 std::string name_; | 221 std::string name_; |
| 220 base::ElapsedTimer timer_; | 222 base::ElapsedTimer timer_; |
| 221 }; | 223 }; |
| 222 | 224 |
| 223 } // namespace internal | 225 } // namespace internal |
| 224 | 226 |
| 225 } // namespace device_event_log | 227 } // namespace device_event_log |
| 226 | 228 |
| 227 #endif // DEVICE_EVENT_LOG_DEVICE_EVENT_LOG_H_ | 229 #endif // DEVICE_EVENT_LOG_DEVICE_EVENT_LOG_H_ |
| OLD | NEW |