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

Issue 1785613006: Make GCMDriver::GetInstanceIDHandler protected, to avoid misuse (Closed)

Created:
4 years, 9 months ago by johnme
Modified:
4 years, 9 months ago
Reviewers:
Peter Beverloo
CC:
chromium-reviews, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rename GCMDriver::GetInstanceIDHandler to avoid misuse GCMDriver::GetInstanceIDHandler and the GCMDriverDesktop's implementations of the InstanceIDHandler methods are public. This broke the encapsulation model of instance_id::InstanceID, which assumes it can safely cache the results of InstanceIDHandler methods, as it is the only class that can modify Instance IDs. This patch renames GCMDriver::GetInstanceIDHandler to GCMDriver::GetInstanceIDHandlerInternal as a warning, and adds a comment that it should only be used by InstanceID (and tests). BUG=589461 Committed: https://crrev.com/54a3e1481e43a7e4debb0ec204a078d1e78d25c6 Cr-Commit-Position: refs/heads/master@{#380692}

Patch Set 1 #

Patch Set 2 : Simplify by removing provider #

Total comments: 8

Patch Set 3 : Address peter's review comments #

Total comments: 8

Patch Set 4 : Address peter's nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -110 lines) Patch
M components/gcm_driver/fake_gcm_driver.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/fake_gcm_driver.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/gcm_driver.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M components/gcm_driver/gcm_driver_android.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/gcm_driver_android.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/gcm_driver_desktop.h View 1 2 3 3 chunks +19 lines, -19 lines 0 comments Download
M components/gcm_driver/gcm_driver_desktop.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/gcm_driver_desktop_unittest.cc View 1 2 5 chunks +29 lines, -19 lines 0 comments Download
M components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h View 1 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M components/gcm_driver/instance_id/instance_id.h View 1 2 3 3 chunks +11 lines, -5 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_android.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/instance_id/instance_id_android.cc View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_driver.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M components/gcm_driver/instance_id/instance_id_driver.cc View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M components/gcm_driver/instance_id/instance_id_impl.h View 1 2 3 4 chunks +1 line, -6 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_impl.cc View 1 2 7 chunks +20 lines, -42 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
johnme
4 years, 9 months ago (2016-03-10 20:20:31 UTC) #2
Peter Beverloo
https://codereview.chromium.org/1785613006/diff/20001/components/gcm_driver/gcm_driver.h File components/gcm_driver/gcm_driver.h (right): https://codereview.chromium.org/1785613006/diff/20001/components/gcm_driver/gcm_driver.h#newcode215 components/gcm_driver/gcm_driver.h:215: // Supports InstanceID handling. Must only be used by ...
4 years, 9 months ago (2016-03-10 21:11:24 UTC) #4
johnme
Addressed review comments https://codereview.chromium.org/1785613006/diff/20001/components/gcm_driver/gcm_driver.h File components/gcm_driver/gcm_driver.h (right): https://codereview.chromium.org/1785613006/diff/20001/components/gcm_driver/gcm_driver.h#newcode215 components/gcm_driver/gcm_driver.h:215: // Supports InstanceID handling. Must only ...
4 years, 9 months ago (2016-03-11 15:56:04 UTC) #5
Peter Beverloo
lgtm % comments Also please s/were public/are public/ in the description. https://codereview.chromium.org/1785613006/diff/40001/components/gcm_driver/instance_id/instance_id.h File components/gcm_driver/instance_id/instance_id.h (right): ...
4 years, 9 months ago (2016-03-11 16:10:20 UTC) #6
johnme
Addressed nits - thanks :) > Also please s/were public/are public/ in the description. Done. ...
4 years, 9 months ago (2016-03-11 17:53:23 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1785613006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1785613006/60001
4 years, 9 months ago (2016-03-11 17:54:21 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 9 months ago (2016-03-11 19:13:30 UTC) #13
commit-bot: I haz the power
4 years, 9 months ago (2016-03-11 19:14:33 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/54a3e1481e43a7e4debb0ec204a078d1e78d25c6
Cr-Commit-Position: refs/heads/master@{#380692}

Powered by Google App Engine
This is Rietveld 408576698