Chromium Code Reviews| Index: remoting/client/jni/android_keymap.cc |
| diff --git a/remoting/client/jni/android_keymap.cc b/remoting/client/jni/android_keymap.cc |
| index f42704661399f7832fd0579796fd11e9111904e2..659e50baf670480c21e12111145745c9d7041a49 100644 |
| --- a/remoting/client/jni/android_keymap.cc |
| +++ b/remoting/client/jni/android_keymap.cc |
| @@ -4,6 +4,8 @@ |
| #include "remoting/client/jni/android_keymap.h" |
| +#include "base/logging.h" |
| + |
| namespace { |
| // These must be defined in the same order as the Android keycodes in |
| @@ -201,7 +203,9 @@ const uint32 usb_keycodes[] = { |
| namespace remoting { |
| -uint32 AndroidKeycodeToUsbKeycode(int android) { |
| +uint32 AndroidKeycodeToUsbKeycode(size_t android) { |
| + DCHECK(android < sizeof usb_keycodes / sizeof (uint32)); |
|
Sergey Ulanov
2013/07/30 21:55:18
DCHECK_LT.
Please add parenthesis around usb_keyco
solb
2013/07/30 23:03:38
Done.
|
| + |
| return usb_keycodes[android]; |
| } |