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

Issue 15298012: Change the WebSocket OpCode constants to an enum (Closed)

Created:
7 years, 7 months ago by Adam Rice
Modified:
7 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Change the WebSocket OpCode constants to an enum In order to permit them to be used in switch statements, changed the kOpCode* constants to an enum. Simplified IsKnownDataOpCode() and IsKnownControlOpCode() since the compiler can now see the values and so produce optimised output with no need for bit fiddling. Also applied style fixes suggested by clang-format and cpplint.py. BUG= TEST=net_unittests chromedriver_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201086

Patch Set 1 #

Total comments: 4

Patch Set 2 : Amend comments for IsKnown*OpCode. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -165 lines) Patch
M net/websockets/websocket_frame.h View 1 4 chunks +36 lines, -31 lines 0 comments Download
M net/websockets/websocket_frame.cc View 9 chunks +27 lines, -43 lines 0 comments Download
M net/websockets/websocket_frame_parser.cc View 3 chunks +4 lines, -6 lines 0 comments Download
M net/websockets/websocket_frame_parser_unittest.cc View 8 chunks +15 lines, -21 lines 0 comments Download
M net/websockets/websocket_frame_unittest.cc View 14 chunks +61 lines, -64 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Adam Rice
7 years, 7 months ago (2013-05-17 19:03:40 UTC) #1
yhirano
https://codereview.chromium.org/15298012/diff/1/net/websockets/websocket_frame.h File net/websockets/websocket_frame.h (right): https://codereview.chromium.org/15298012/diff/1/net/websockets/websocket_frame.h#newcode39 net/websockets/websocket_frame.h:39: // Efficiently determine whether a given opcode is one ...
7 years, 7 months ago (2013-05-20 05:06:02 UTC) #2
Adam Rice
https://codereview.chromium.org/15298012/diff/1/net/websockets/websocket_frame.h File net/websockets/websocket_frame.h (right): https://codereview.chromium.org/15298012/diff/1/net/websockets/websocket_frame.h#newcode39 net/websockets/websocket_frame.h:39: // Efficiently determine whether a given opcode is one ...
7 years, 7 months ago (2013-05-20 07:19:49 UTC) #3
yhirano
lgtm
7 years, 7 months ago (2013-05-20 07:30:03 UTC) #4
Adam Rice
Hi toyoshim. Can you give this OWNERS review, if you have time?
7 years, 7 months ago (2013-05-20 07:34:18 UTC) #5
Takashi Toyoshima
lgtm!
7 years, 7 months ago (2013-05-20 10:01:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/15298012/5001
7 years, 7 months ago (2013-05-20 11:21:33 UTC) #7
commit-bot: I haz the power
7 years, 7 months ago (2013-05-20 14:40:12 UTC) #8
Message was sent while issue was closed.
Change committed as 201086

Powered by Google App Engine
This is Rietveld 408576698