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

Unified Diff: components/device_event_log/device_event_log.h

Issue 941063003: Log device/usb messages to chrome://device-log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and adjust log levels. Created 5 years, 10 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
Index: components/device_event_log/device_event_log.h
diff --git a/components/device_event_log/device_event_log.h b/components/device_event_log/device_event_log.h
index cc733e4e11a8d32a85262ec1817918ee5c2eedbe..7a0948606644cc7280d1f6bf50bdbfefc6cbbb4e 100644
--- a/components/device_event_log/device_event_log.h
+++ b/components/device_event_log/device_event_log.h
@@ -31,6 +31,9 @@
#define LOGIN_LOG(level) \
DEVICE_LOG(::device_event_log::LOG_TYPE_LOGIN, \
::device_event_log::LOG_LEVEL_##level)
+#define USB_LOG(level) \
+ DEVICE_LOG(::device_event_log::LOG_TYPE_USB, \
+ ::device_event_log::LOG_LEVEL_##level)
// Generally prefer the above macros unless |type| or |level| is not constant.
@@ -61,6 +64,8 @@ enum LogType {
LOG_TYPE_POWER,
// Login related events.
LOG_TYPE_LOGIN,
+ // USB device related events (i.e. device/usb).
+ LOG_TYPE_USB,
// Used internally
LOG_TYPE_UNKNOWN
};

Powered by Google App Engine
This is Rietveld 408576698