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

Issue 785983002: Have FakeGCMProfileService return different registration IDs each time (Closed)

Created:
6 years ago by johnme
Modified:
5 years, 11 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, zea+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Have FakeGCMProfileService return different registration IDs each time This will be necessary for testing that the Push API code properly persists push registrations to disk. The slightly odd 1000 * (sender_ids.size() - 1) means that existing tests that only register once and pass in a single sender ID are unchanged. BUG=429212 Committed: https://crrev.com/29022c572fbd857e94f9e1d1eb5c19ed285863a2 Cr-Commit-Position: refs/heads/master@{#307906}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add comment #

Patch Set 3 : Use IntToString instead of UintToString #

Total comments: 2

Patch Set 4 : Simpler ID format #

Total comments: 4

Patch Set 5 : Tweak argument wrapping #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -10 lines) Patch
M chrome/browser/services/gcm/fake_gcm_profile_service.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/fake_gcm_profile_service.cc View 1 2 3 4 3 chunks +14 lines, -4 lines 0 comments Download
M chrome/browser/services/gcm/push_messaging_browsertest.cc View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/test/data/extensions/api_test/gcm/functions/register_validation/register_validation.js View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 14 (3 generated)
johnme
6 years ago (2014-12-08 15:41:57 UTC) #2
Avi (use Gerrit)
LGTM if you explain in the code. https://codereview.chromium.org/785983002/diff/1/chrome/browser/services/gcm/fake_gcm_profile_service.cc File chrome/browser/services/gcm/fake_gcm_profile_service.cc (right): https://codereview.chromium.org/785983002/diff/1/chrome/browser/services/gcm/fake_gcm_profile_service.cc#newcode134 chrome/browser/services/gcm/fake_gcm_profile_service.cc:134: + (++registration_count_)), ...
6 years ago (2014-12-08 19:08:43 UTC) #4
johnme
Added comment explaining fake registration ID generation at Avi's suggestion. https://codereview.chromium.org/785983002/diff/1/chrome/browser/services/gcm/fake_gcm_profile_service.cc File chrome/browser/services/gcm/fake_gcm_profile_service.cc (right): https://codereview.chromium.org/785983002/diff/1/chrome/browser/services/gcm/fake_gcm_profile_service.cc#newcode134 ...
6 years ago (2014-12-08 20:30:28 UTC) #5
fgorski
lgtm Could you flip the created ID per suggestion? https://codereview.chromium.org/785983002/diff/40001/chrome/browser/services/gcm/fake_gcm_profile_service.cc File chrome/browser/services/gcm/fake_gcm_profile_service.cc (right): https://codereview.chromium.org/785983002/diff/40001/chrome/browser/services/gcm/fake_gcm_profile_service.cc#newcode135 chrome/browser/services/gcm/fake_gcm_profile_service.cc:135: ...
6 years ago (2014-12-08 22:36:59 UTC) #6
johnme
https://codereview.chromium.org/785983002/diff/40001/chrome/browser/services/gcm/fake_gcm_profile_service.cc File chrome/browser/services/gcm/fake_gcm_profile_service.cc (right): https://codereview.chromium.org/785983002/diff/40001/chrome/browser/services/gcm/fake_gcm_profile_service.cc#newcode135 chrome/browser/services/gcm/fake_gcm_profile_service.cc:135: int registration_id = ++registration_count_ + 1000 * (sender_ids.size() - ...
6 years ago (2014-12-10 14:12:53 UTC) #7
fgorski
still lg, with a nit and a question. https://codereview.chromium.org/785983002/diff/60001/chrome/browser/services/gcm/fake_gcm_profile_service.cc File chrome/browser/services/gcm/fake_gcm_profile_service.cc (right): https://codereview.chromium.org/785983002/diff/60001/chrome/browser/services/gcm/fake_gcm_profile_service.cc#newcode135 chrome/browser/services/gcm/fake_gcm_profile_service.cc:135: std::string ...
6 years ago (2014-12-10 17:34:56 UTC) #8
johnme
https://codereview.chromium.org/785983002/diff/60001/chrome/browser/services/gcm/fake_gcm_profile_service.cc File chrome/browser/services/gcm/fake_gcm_profile_service.cc (right): https://codereview.chromium.org/785983002/diff/60001/chrome/browser/services/gcm/fake_gcm_profile_service.cc#newcode135 chrome/browser/services/gcm/fake_gcm_profile_service.cc:135: std::string registration_id = base::StringPrintf("%" PRIuS "-%d", On 2014/12/10 17:34:55, ...
6 years ago (2014-12-11 14:25:06 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/785983002/80001
6 years ago (2014-12-11 14:25:26 UTC) #11
johnme
Thanks for the re-review btw :)
6 years ago (2014-12-11 14:25:28 UTC) #12
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years ago (2014-12-11 16:26:38 UTC) #13
commit-bot: I haz the power
6 years ago (2014-12-11 16:27:20 UTC) #14
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/29022c572fbd857e94f9e1d1eb5c19ed285863a2
Cr-Commit-Position: refs/heads/master@{#307906}

Powered by Google App Engine
This is Rietveld 408576698