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

Issue 2222903004: Clear client id prefs when opting out of UMA. (Closed)

Created:
4 years, 4 months ago by Alexei Svitkine (slow)
Modified:
4 years, 4 months ago
CC:
chromium-reviews, grt+watch_chromium.org, pennymac+watch_chromium.org, asvitkine+watch_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clear client id prefs when opting out of UMA. When a user opts out of UMA, we should clear their previous client id. Opting back in should result in a new client id to be re-generated. This CL clears both the client id stored in local state prefs as well as the backup of it in the registry on Windows. On other platforms, the backup of the client id is stored in the consent file, which was already being correctly deleted. The codepath to enable metrics is different on Android and this CL adds a couple of TODOs to unify things more in the future. That would be a larger refactoring and I think should be done in a separate CL. BUG=635669 TEST=On a machine that does not have Chrome entreprise policy, open chrome://settings and enable "Automatically send usage statistics and crash reports to Google". Then, check that there is a client_id2 entry in chrome://local-state. Now, uncheck the checkbox on the setting page and verify that reloading chrome://local-state does not have a client_id2 field. Committed: https://crrev.com/2b53ee08893700984b965c09713a65342d4019a2 Cr-Commit-Position: refs/heads/master@{#411979}

Patch Set 1 #

Patch Set 2 : Remove early return in ForceClientIdCreation(). #

Total comments: 2

Patch Set 3 : Fix metrics state manager test. #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -11 lines) Patch
M chrome/browser/android/metrics/uma_session_stats.cc View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/metrics/metrics_reporting_state.cc View 1 2 3 1 chunk +13 lines, -1 line 0 comments Download
M chrome/installer/util/google_update_settings.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/installer/util/google_update_settings_unittest.cc View 3 chunks +17 lines, -5 lines 0 comments Download
M components/metrics/metrics_pref_names.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/metrics/metrics_state_manager.cc View 1 2 3 1 chunk +8 lines, -3 lines 0 comments Download

Messages

Total messages: 54 (38 generated)
Alexei Svitkine (slow)
gayane & jwd: please review the metrics changes grt: please review the google update settings ...
4 years, 4 months ago (2016-08-12 17:36:49 UTC) #21
jwd
On 2016/08/12 17:36:49, Alexei Svitkine (very slow) wrote: > gayane & jwd: please review the ...
4 years, 4 months ago (2016-08-12 18:29:26 UTC) #24
Alexei Svitkine (slow)
Interesting. You're right that it will be re-used for the session. I think we could ...
4 years, 4 months ago (2016-08-12 19:21:37 UTC) #25
Alexei Svitkine (slow)
On 2016/08/12 19:21:37, Alexei Svitkine (very slow) wrote: > Interesting. You're right that it will ...
4 years, 4 months ago (2016-08-12 19:23:42 UTC) #26
Alexei Svitkine (slow)
Removed the early return in MetricsStateManager::ForceClientIdCreation() per discussion. PTAL.
4 years, 4 months ago (2016-08-12 19:25:59 UTC) #28
grt (UTC plus 2)
chrome/installer lgtm w/ a nit should we also clear the crash client id? https://codereview.chromium.org/2222903004/diff/120001/chrome/installer/util/google_update_settings.cc File ...
4 years, 4 months ago (2016-08-12 19:43:32 UTC) #32
jwd
On 2016/08/12 19:43:32, grt (UTC plus 2) wrote: > chrome/installer lgtm w/ a nit > ...
4 years, 4 months ago (2016-08-12 20:00:55 UTC) #33
jwd
On 2016/08/12 19:23:42, Alexei Svitkine (very slow) wrote: > On 2016/08/12 19:21:37, Alexei Svitkine (very ...
4 years, 4 months ago (2016-08-12 20:02:06 UTC) #34
Alexei Svitkine (slow)
On 2016/08/12 20:02:06, jwd wrote: > On 2016/08/12 19:23:42, Alexei Svitkine (very slow) wrote: > ...
4 years, 4 months ago (2016-08-12 21:44:14 UTC) #35
jwd
On 2016/08/12 21:44:14, Alexei Svitkine (very slow) wrote: > On 2016/08/12 20:02:06, jwd wrote: > ...
4 years, 4 months ago (2016-08-12 21:52:02 UTC) #36
Alexei Svitkine (slow)
Thanks. I'll do the clean up of moving the crash client id clearing in the ...
4 years, 4 months ago (2016-08-12 22:29:59 UTC) #41
jwd
lgtm
4 years, 4 months ago (2016-08-15 15:13:55 UTC) #46
gayane -on leave until 09-2017
lgtm
4 years, 4 months ago (2016-08-15 15:43:09 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2222903004/160001
4 years, 4 months ago (2016-08-15 16:00:17 UTC) #50
commit-bot: I haz the power
Committed patchset #4 (id:160001)
4 years, 4 months ago (2016-08-15 17:36:46 UTC) #52
commit-bot: I haz the power
4 years, 4 months ago (2016-08-15 17:41:03 UTC) #54
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/2b53ee08893700984b965c09713a65342d4019a2
Cr-Commit-Position: refs/heads/master@{#411979}

Powered by Google App Engine
This is Rietveld 408576698