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

Issue 162233002: [GCM] Remove all persisted data and close connections when signing out of a profile (Closed)

Created:
6 years, 10 months ago by jianli
Modified:
6 years, 10 months ago
Reviewers:
Nicolas Zea, fgorski
CC:
chromium-reviews
Visibility:
Public.

Description

[GCM] Remove all persisted data and close connections when signing out of a profile When a profile is being signed out, we need to: 1) Close all the requests and connections. 2) Delete the GCM store. 3) Delete the persisted registration info (sender IDs and registration ID) from the app's state store. 4) Delete the persisted data from prefs store To support 3, we need to remember the IDs of all registered apps. As the result, I added the code to write the IDs of all registered apps to the prefs store. Also due to this change, we do not need to listen to NOTIFICATION_EXTENSION_LOADED and load the registration info when the app is loaded because we will restore all the app IDs and then read all the registration info when GCMProfileService starts. This also makes us support other types of apps. BUG=284553 TEST=new tests added Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250958

Patch Set 1 : Patch #

Total comments: 6

Patch Set 2 : Address feedback #

Total comments: 1

Patch Set 3 : Patch to land #

Patch Set 4 : Fix trybot tests #

Patch Set 5 : Patch to land #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -16 lines) Patch
M chrome/browser/services/gcm/gcm_profile_service.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/gcm_profile_service.cc View 1 2 3 4 8 chunks +45 lines, -12 lines 0 comments Download
M chrome/browser/services/gcm/gcm_profile_service_unittest.cc View 1 2 3 4 2 chunks +20 lines, -3 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M google_apis/gcm/engine/mcs_client.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M google_apis/gcm/gcm_client_impl.cc View 1 chunk +5 lines, -1 line 0 comments Download
M google_apis/gcm/gcm_client_impl_unittest.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
jianli
6 years, 10 months ago (2014-02-12 23:58:07 UTC) #1
fgorski
https://codereview.chromium.org/162233002/diff/150001/chrome/browser/services/gcm/gcm_profile_service.cc File chrome/browser/services/gcm/gcm_profile_service.cc (left): https://codereview.chromium.org/162233002/diff/150001/chrome/browser/services/gcm/gcm_profile_service.cc#oldcode517 chrome/browser/services/gcm/gcm_profile_service.cc:517: chrome::NOTIFICATION_EXTENSION_LOADED, please edit the CL description to cover why ...
6 years, 10 months ago (2014-02-13 00:20:08 UTC) #2
jianli
https://codereview.chromium.org/162233002/diff/150001/chrome/browser/services/gcm/gcm_profile_service.cc File chrome/browser/services/gcm/gcm_profile_service.cc (left): https://codereview.chromium.org/162233002/diff/150001/chrome/browser/services/gcm/gcm_profile_service.cc#oldcode517 chrome/browser/services/gcm/gcm_profile_service.cc:517: chrome::NOTIFICATION_EXTENSION_LOADED, On 2014/02/13 00:20:12, Filip Gorski wrote: > please ...
6 years, 10 months ago (2014-02-13 00:32:47 UTC) #3
fgorski
lgtm
6 years, 10 months ago (2014-02-13 00:34:27 UTC) #4
Nicolas Zea
LGTM with a nit https://codereview.chromium.org/162233002/diff/230001/chrome/common/pref_names.cc File chrome/common/pref_names.cc (right): https://codereview.chromium.org/162233002/diff/230001/chrome/common/pref_names.cc#newcode1306 chrome/common/pref_names.cc:1306: // Apps that use GCM. ...
6 years, 10 months ago (2014-02-13 01:24:59 UTC) #5
jianli
The CQ bit was checked by jianli@chromium.org
6 years, 10 months ago (2014-02-13 01:39:51 UTC) #6
jianli
The CQ bit was unchecked by jianli@chromium.org
6 years, 10 months ago (2014-02-13 01:40:50 UTC) #7
jianli
The CQ bit was checked by jianli@chromium.org
6 years, 10 months ago (2014-02-13 01:45:40 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jianli@chromium.org/162233002/490001
6 years, 10 months ago (2014-02-13 01:51:41 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-13 02:48:41 UTC) #10
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) app_list_unittests, ash_unittests, aura_unittests, base_unittests, browser_tests, cacheinvalidation_unittests, ...
6 years, 10 months ago (2014-02-13 02:48:41 UTC) #11
jianli
The CQ bit was checked by jianli@chromium.org
6 years, 10 months ago (2014-02-13 03:43:54 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jianli@chromium.org/162233002/490001
6 years, 10 months ago (2014-02-13 03:45:54 UTC) #13
commit-bot: I haz the power
6 years, 10 months ago (2014-02-13 05:21:05 UTC) #14
Message was sent while issue was closed.
Change committed as 250958

Powered by Google App Engine
This is Rietveld 408576698