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

Issue 2473093002: Improve GCM enum switch type safety (Closed)

Created:
4 years, 1 month ago by johnme
Modified:
4 years, 1 month ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2883
Project:
chromium
Visibility:
Public.

Description

Improve GCM enum switch type safety Now that most/all of our compilers warn when enum values are omitted from a switch statement with no default case, it's better to omit the default case so that anyone adding new enum values gets compile failures if they forget to update one of the switches. Also converted two lists of == FOO || == BAR || == BAZ to switches for the same reason. And reordered a few switches to match the enums. Should have no functional changes, except that GetConnectionResetReasonString can now stringify NEW_HEARTBEAT_INTERVAL (an enum value that had been omitted). BUG=none Review-Url: https://chromiumcodereview.appspot.com/2427633005 Cr-Commit-Position: refs/heads/master@{#426303} (cherry picked from commit 133bfbad6055349368a955d16318c1997d39810b) Committed: https://chromium.googlesource.com/chromium/src/+/f6af6a205a30cb5d3bc2f9682072c5df85b4660b

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -71 lines) Patch
M components/gcm_driver/gcm_client_impl.cc View 7 chunks +11 lines, -22 lines 0 comments Download
M components/gcm_driver/gcm_desktop_utils.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M components/gcm_driver/gcm_stats_recorder_impl.cc View 6 chunks +15 lines, -11 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_impl.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M google_apis/gcm/engine/account_mapping.cc View 1 chunk +1 line, -2 lines 0 comments Download
M google_apis/gcm/engine/checkin_request.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M google_apis/gcm/engine/connection_handler_impl.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M google_apis/gcm/engine/mcs_client.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M google_apis/gcm/engine/registration_request.cc View 1 chunk +19 lines, -8 lines 0 comments Download
M google_apis/gcm/engine/unregistration_request.cc View 4 chunks +25 lines, -11 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
johnme
4 years, 1 month ago (2016-11-03 17:45:40 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
f6af6a205a30cb5d3bc2f9682072c5df85b4660b.

Powered by Google App Engine
This is Rietveld 408576698