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

Side by Side Diff: ui/events/mojo/event_struct_traits.cc

Issue 2719223004: Adding NOTREACHED in Read() in Event StructTraits to add clarity to the code.
Patch Set: Fix upstream. Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "ui/events/mojo/event_struct_traits.h" 5 #include "ui/events/mojo/event_struct_traits.h"
6 6
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/events/event_utils.h" 8 #include "ui/events/event_utils.h"
9 #include "ui/events/keycodes/dom/keycode_converter.h" 9 #include "ui/events/keycodes/dom/keycode_converter.h"
10 #include "ui/events/mojo/event_constants.mojom.h" 10 #include "ui/events/mojo/event_constants.mojom.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 case ui::mojom::PointerKind::PEN: 302 case ui::mojom::PointerKind::PEN:
303 NOTIMPLEMENTED(); 303 NOTIMPLEMENTED();
304 return false; 304 return false;
305 } 305 }
306 } 306 }
307 case ui::mojom::EventType::UNKNOWN: 307 case ui::mojom::EventType::UNKNOWN:
308 return false; 308 return false;
309 } 309 }
310 310
311 NOTREACHED();
sadrul 2017/03/02 00:00:38 I am not sure if NOTREACHED() is good here. Becaus
mfomitchev 2017/03/02 00:03:41 If the event is invalid, it's type will be UNKNOWN
sadrul 2017/03/02 02:22:31 I think it's possible for the sender to send an ev
mfomitchev 2017/03/02 03:05:45 Hmm.. at this point we have EventDataView object,
Tom Sepez 2017/03/02 18:54:37 Doesn't NOTREACHED() only fire in the debug code?
311 return false; 312 return false;
312 } 313 }
313 314
314 } // namespace mojo 315 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698