Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 21580002: Add histograms to track synced pref changes. (Closed)

Created:
7 years, 4 months ago by Ken Rockot(use gerrit already)
Modified:
7 years, 4 months ago
CC:
chromium-reviews, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add histograms to track synced pref changes. Certain prefs will now elicit stat tracking whenever they are changed locally and pushed to sync, or when changes from sync server are pulled down to update the local pref store. New histogram names take the form: Settings.$prefname.Changed{FromSync,Local} The logged value is the new pref value imposed by the change. BUG=265627 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216813

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : . #

Total comments: 7

Patch Set 4 : #

Total comments: 34

Patch Set 5 : cleanup and nits #

Patch Set 6 : histogram cleanup #

Patch Set 7 : add browser tests #

Patch Set 8 : ignore managed prefs; fix tests #

Patch Set 9 : small cleanup #

Total comments: 3

Patch Set 10 : doh. #

Patch Set 11 : static storage sadface #

Patch Set 12 : fix dynamic histograms and test cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+629 lines, -1 line) Patch
M chrome/browser/prefs/pref_metrics_service.h View 1 2 3 4 2 chunks +45 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_metrics_service.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +100 lines, -1 line 0 comments Download
M chrome/browser/prefs/pref_model_associator.h View 1 2 3 4 3 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_model_associator.cc View 1 2 3 4 6 chunks +40 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service_syncable.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service_syncable.cc View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/browser/prefs/synced_pref_change_registrar.h View 1 2 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/prefs/synced_pref_change_registrar.cc View 1 2 3 4 5 6 7 1 chunk +66 lines, -0 lines 0 comments Download
A chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +216 lines, -0 lines 0 comments Download
A chrome/browser/prefs/synced_pref_observer.h View 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +43 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Ken Rockot(use gerrit already)
PTAL
7 years, 4 months ago (2013-08-01 17:05:21 UTC) #1
bbudge
LGTM for PrefMetricsService part, and histograms.xml. https://codereview.chromium.org/21580002/diff/7001/chrome/browser/prefs/pref_metrics_service.cc File chrome/browser/prefs/pref_metrics_service.cc (right): https://codereview.chromium.org/21580002/diff/7001/chrome/browser/prefs/pref_metrics_service.cc#newcode199 chrome/browser/prefs/pref_metrics_service.cc:199: from_sync ? ".PulledFromSync" ...
7 years, 4 months ago (2013-08-01 17:48:08 UTC) #2
Ken Rockot(use gerrit already)
Thanks https://codereview.chromium.org/21580002/diff/7001/chrome/browser/prefs/pref_metrics_service.cc File chrome/browser/prefs/pref_metrics_service.cc (right): https://codereview.chromium.org/21580002/diff/7001/chrome/browser/prefs/pref_metrics_service.cc#newcode199 chrome/browser/prefs/pref_metrics_service.cc:199: from_sync ? ".PulledFromSync" : "PushedToSync"); On 2013/08/01 17:48:08, ...
7 years, 4 months ago (2013-08-01 17:55:14 UTC) #3
Alexei Svitkine (slow)
histograms.xml lgtm
7 years, 4 months ago (2013-08-01 18:02:51 UTC) #4
meacer
LGTM
7 years, 4 months ago (2013-08-01 20:48:03 UTC) #5
Ken Rockot(use gerrit already)
ping battre@
7 years, 4 months ago (2013-08-05 15:35:42 UTC) #6
battre
Sorry, I did not get through it today. https://codereview.chromium.org/21580002/diff/14002/chrome/browser/prefs/pref_model_associator.cc File chrome/browser/prefs/pref_model_associator.cc (right): https://codereview.chromium.org/21580002/diff/14002/chrome/browser/prefs/pref_model_associator.cc#newcode403 chrome/browser/prefs/pref_model_associator.cc:403: NotifySyncedPrefObservers(name, ...
7 years, 4 months ago (2013-08-05 17:17:26 UTC) #7
battre
I think I have found two bugs. How about some unit tests? https://codereview.chromium.org/21580002/diff/14002/chrome/browser/prefs/pref_metrics_service.cc File chrome/browser/prefs/pref_metrics_service.cc ...
7 years, 4 months ago (2013-08-06 15:54:38 UTC) #8
Ken Rockot(use gerrit already)
Thanks. Just some questions about the potential bugs for now https://codereview.chromium.org/21580002/diff/14002/chrome/browser/prefs/pref_metrics_service.cc File chrome/browser/prefs/pref_metrics_service.cc (right): https://codereview.chromium.org/21580002/diff/14002/chrome/browser/prefs/pref_metrics_service.cc#newcode201 ...
7 years, 4 months ago (2013-08-06 16:27:46 UTC) #9
Ken Rockot(use gerrit already)
Going to do some additional verification regarding the possible bugs you've highlighted. In the meantime, ...
7 years, 4 months ago (2013-08-06 20:18:32 UTC) #10
battre
https://codereview.chromium.org/21580002/diff/14002/chrome/browser/prefs/pref_metrics_service.cc File chrome/browser/prefs/pref_metrics_service.cc (right): https://codereview.chromium.org/21580002/diff/14002/chrome/browser/prefs/pref_metrics_service.cc#newcode201 chrome/browser/prefs/pref_metrics_service.cc:201: callback.Run(histogram_name, pref->GetValue()); On 2013/08/06 16:27:46, rockot wrote: > On ...
7 years, 4 months ago (2013-08-07 07:22:39 UTC) #11
Ken Rockot(use gerrit already)
Ah, I understand now. I was confused by the comment being under ProcessPrefChange, which only ...
7 years, 4 months ago (2013-08-07 23:45:05 UTC) #12
Ken Rockot(use gerrit already)
What I've done for now is prevent SyncedPrefChangeRegistrar from notifying its observers if the pref ...
7 years, 4 months ago (2013-08-08 18:12:50 UTC) #13
battre
Great! LGTM https://codereview.chromium.org/21580002/diff/44001/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc File chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc (right): https://codereview.chromium.org/21580002/diff/44001/chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc#newcode146 chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc:146: ASSERT_TRUE(observer.has_been_notified); this and the following should be ...
7 years, 4 months ago (2013-08-09 12:04:00 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/21580002/61001
7 years, 4 months ago (2013-08-09 15:00:09 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/21580002/87001
7 years, 4 months ago (2013-08-09 18:48:29 UTC) #16
commit-bot: I haz the power
7 years, 4 months ago (2013-08-10 07:07:13 UTC) #17
Message was sent while issue was closed.
Change committed as 216813

Powered by Google App Engine
This is Rietveld 408576698