| Index: ui/events/keycodes/dom4/keycode_converter.cc
|
| diff --git a/ui/events/keycodes/dom4/keycode_converter.cc b/ui/events/keycodes/dom4/keycode_converter.cc
|
| index 7c81862278f1bf1f126f33f20fc32cc01af4d4a6..d9a26a2c44461edf2c8c2deb9151f0afb755c23a 100644
|
| --- a/ui/events/keycodes/dom4/keycode_converter.cc
|
| +++ b/ui/events/keycodes/dom4/keycode_converter.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "ui/events/keycodes/dom4/keycode_converter.h"
|
|
|
| +#include "base/logging.h"
|
| #include "ui/events/keycodes/dom3/dom_code.h"
|
| #include "ui/events/keycodes/dom3/dom_key.h"
|
|
|
| @@ -118,14 +119,17 @@ int KeycodeConverter::DomCodeToNativeKeycode(DomCode code) {
|
|
|
| // static
|
| DomCode KeycodeConverter::CodeStringToDomCode(const char* code) {
|
| - if (!code || !*code)
|
| + if (!code || !*code) {
|
| + LOG(WARNING) << "empty code string";
|
| return DomCode::NONE;
|
| + }
|
| for (size_t i = 0; i < kKeycodeMapEntries; ++i) {
|
| if (usb_keycode_map[i].code &&
|
| strcmp(usb_keycode_map[i].code, code) == 0) {
|
| return static_cast<DomCode>(usb_keycode_map[i].usb_keycode);
|
| }
|
| }
|
| + LOG(WARNING) << "unrecognized code string '" << code << "'";
|
| return DomCode::NONE;
|
| }
|
|
|
|
|