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

Issue 1411863002: Use kMetricsReportingEnabled instead of kStatsReporingPref on metrics side (Closed)

Created:
5 years, 2 months ago by gayane -on leave until 09-2017
Modified:
5 years, 1 month ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, michaelpg+watch-options_chromium.org, oshima+watch_chromium.org, dzhioev+watch_chromium.org, achuith+watch_chromium.org, arv+watch_chromium.org, asvitkine+watch_chromium.org, davemoore+watch_chromium.org, bartfab (slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use kMetricsReportingEnabled instead of kStatsReporingPref on metrics side Main changes: - mapping kMetricsReportingEnabled to platform specific policy - change metrics code to use kMetricsReportingEnabled instead of kStatsReporingPref - For ChromeOS, initialize kMetricsReportingEnabled with kStatsReporingPref - Update both kMetricsReportingEnabled and kStatsReporingPref, when user toggles the checkbox - remove outdated migration code for kStatsReporingPref Here are the scenarios that I tested manually: - Start Chrome OS on fresh dir. Checkbox shows checked or unchecked based on what user selected during EULA accept. Check that its the same after restarting Chrome OS - Start Chrome OS on fresh user dir, test with non owner. Shows disabled checkbox with "controled by owner" icon. Its checked or unchecked based on what user selected on EULA accept - Start on Chrome OS on fresh dir, enroll to enterprise policy. Regardless of what was selected during EULA phase the checkbox is checked and disabled with "controled by policy" icon - Start Chrome OS without current changes on clean user dir, uncheck the checkbox. Start Chrome OS which includes current changes. Check that checkbox is still unchecked. BUG=532084 Committed: https://crrev.com/e7e32dc0a88082d9fa8a85cca1eb36d74cc1966d Cr-Commit-Position: refs/heads/master@{#360657}

Patch Set 1 : #

Total comments: 10

Patch Set 2 : Delete settings pref ref from priviate_api + Added comments #

Total comments: 9

Patch Set 3 : Added TODO #

Patch Set 4 : Restore kStatsReportingPref and tie with kMetricsReportingEnabled #

Patch Set 5 : sync #

Patch Set 6 : sync fix #

Patch Set 7 : fix unittests #

Total comments: 12

Patch Set 8 : fix comments #

Total comments: 10

Patch Set 9 : add observer for kStatsReportingPref #

Total comments: 17

Patch Set 10 : nits #

Total comments: 6

Patch Set 11 : fix callback #

Total comments: 8

Patch Set 12 : sync #

Patch Set 13 : nits comments TODOs #

Total comments: 4

Patch Set 14 : extend comments and todo #

Patch Set 15 : Add default value for device setting #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -214 lines) Patch
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_provider.h View 7 8 2 chunks +0 lines, -13 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +1 line, -59 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +14 lines, -20 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_accessor.cc View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -14 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_services_manager_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/metrics/metrics_reporting_state.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/metrics/metrics_reporting_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +39 lines, -6 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +2 lines, -15 lines 0 comments Download
M chrome/browser/resources/options/browser_options.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -13 lines 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +51 lines, -39 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +44 lines, -14 lines 0 comments Download

Messages

Total messages: 59 (19 generated)
gayane -on leave until 09-2017
Could you please have an initial look at my changes.
5 years, 2 months ago (2015-10-16 19:57:17 UTC) #3
Alexei Svitkine (slow)
Thanks, really excited by this clean up! Can you expand your CL description to mention ...
5 years, 2 months ago (2015-10-16 21:27:16 UTC) #5
gayane -on leave until 09-2017
Thanks Alexei for the comments. Please have one more look https://codereview.chromium.org/1411863002/diff/20001/chrome/browser/policy/configuration_policy_handler_list_factory.cc File chrome/browser/policy/configuration_policy_handler_list_factory.cc (right): https://codereview.chromium.org/1411863002/diff/20001/chrome/browser/policy/configuration_policy_handler_list_factory.cc#newcode483 ...
5 years, 2 months ago (2015-10-19 21:32:39 UTC) #7
Mattias Nissler (ping if slow)
Looks good for the most part. The aspect I'm not clear about is how a ...
5 years, 2 months ago (2015-10-20 08:33:32 UTC) #8
gayane -on leave until 09-2017
Thanks Mattias for having a look. "The aspect I'm not clear about is how a ...
5 years, 2 months ago (2015-10-20 14:55:39 UTC) #9
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1411863002/diff/40001/chrome/browser/chromeos/login/wizard_controller.cc File chrome/browser/chromeos/login/wizard_controller.cc (left): https://codereview.chromium.org/1411863002/diff/40001/chrome/browser/chromeos/login/wizard_controller.cc#oldcode612 chrome/browser/chromeos/login/wizard_controller.cc:612: CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); On 2015/10/20 14:55:39, gayane wrote: > On ...
5 years, 2 months ago (2015-10-21 09:53:24 UTC) #10
Alexei Svitkine (slow)
https://codereview.chromium.org/1411863002/diff/40001/chrome/browser/chromeos/login/wizard_controller.cc File chrome/browser/chromeos/login/wizard_controller.cc (left): https://codereview.chromium.org/1411863002/diff/40001/chrome/browser/chromeos/login/wizard_controller.cc#oldcode612 chrome/browser/chromeos/login/wizard_controller.cc:612: CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); On 2015/10/21 09:53:24, Mattias Nissler wrote: > ...
5 years, 2 months ago (2015-10-21 16:36:53 UTC) #11
gayane -on leave until 09-2017
https://codereview.chromium.org/1411863002/diff/40001/chrome/browser/chromeos/login/wizard_controller.cc File chrome/browser/chromeos/login/wizard_controller.cc (left): https://codereview.chromium.org/1411863002/diff/40001/chrome/browser/chromeos/login/wizard_controller.cc#oldcode612 chrome/browser/chromeos/login/wizard_controller.cc:612: CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); On 2015/10/21 09:53:24, Mattias Nissler wrote: > ...
5 years, 2 months ago (2015-10-21 17:02:51 UTC) #12
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1411863002/diff/40001/chrome/browser/chromeos/login/wizard_controller.cc File chrome/browser/chromeos/login/wizard_controller.cc (left): https://codereview.chromium.org/1411863002/diff/40001/chrome/browser/chromeos/login/wizard_controller.cc#oldcode612 chrome/browser/chromeos/login/wizard_controller.cc:612: CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); On 2015/10/21 17:02:51, gayane wrote: > On ...
5 years, 2 months ago (2015-10-21 19:05:48 UTC) #13
gayane -on leave until 09-2017
I brought back the kStatsReportingPref and tied it with kMetricsReportingEnabled
5 years, 1 month ago (2015-10-27 20:14:53 UTC) #20
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc#newcode739 chrome/browser/chrome_browser_main.cc:739: // it is more reliable for Chrome OS. suggestion: ...
5 years, 1 month ago (2015-10-28 09:51:16 UTC) #21
gayane -on leave until 09-2017
Thanks Mattias for having a look. Please have a look on my comments below https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc ...
5 years, 1 month ago (2015-10-28 15:00:07 UTC) #22
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc#newcode742 chrome/browser/chrome_browser_main.cc:742: &enable_metrics); On 2015/10/28 15:00:06, gayane wrote: > On 2015/10/28 ...
5 years, 1 month ago (2015-10-29 10:06:14 UTC) #23
Alexei Svitkine (slow)
https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc#newcode742 chrome/browser/chrome_browser_main.cc:742: &enable_metrics); On 2015/10/29 10:06:14, Mattias Nissler wrote: > On ...
5 years, 1 month ago (2015-10-29 17:04:14 UTC) #24
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/1411863002/diff/220001/chrome/browser/chrome_browser_main.cc#newcode742 chrome/browser/chrome_browser_main.cc:742: &enable_metrics); On 2015/10/29 17:04:14, Alexei Svitkine (slow) wrote: > ...
5 years, 1 month ago (2015-11-02 11:09:58 UTC) #25
gayane -on leave until 09-2017
I have added an observer on kStatsReportingPref and address all the other comments. https://codereview.chromium.org/1411863002/diff/240001/chrome/browser/chrome_browser_main.cc File ...
5 years, 1 month ago (2015-11-02 19:23:52 UTC) #26
Alexei Svitkine (slow)
https://codereview.chromium.org/1411863002/diff/260001/chrome/browser/metrics/chrome_metrics_services_manager_client.cc File chrome/browser/metrics/chrome_metrics_services_manager_client.cc (right): https://codereview.chromium.org/1411863002/diff/260001/chrome/browser/metrics/chrome_metrics_services_manager_client.cc#newcode40 chrome/browser/metrics/chrome_metrics_services_manager_client.cc:40: void SetupMetricsStateForChromeOS() { Suggest moving this to metrics_reporting_state.cc and ...
5 years, 1 month ago (2015-11-02 21:50:33 UTC) #27
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1411863002/diff/260001/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc File chrome/browser/chromeos/settings/device_settings_provider_unittest.cc (right): https://codereview.chromium.org/1411863002/diff/260001/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc#newcode245 chrome/browser/chromeos/settings/device_settings_provider_unittest.cc:245: SetLogUploadSettings(false); It's fine to use log upload as the ...
5 years, 1 month ago (2015-11-03 13:24:06 UTC) #28
gayane -on leave until 09-2017
Thanks. I have addressed all the comments https://codereview.chromium.org/1411863002/diff/260001/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc File chrome/browser/chromeos/settings/device_settings_provider_unittest.cc (right): https://codereview.chromium.org/1411863002/diff/260001/chrome/browser/chromeos/settings/device_settings_provider_unittest.cc#newcode245 chrome/browser/chromeos/settings/device_settings_provider_unittest.cc:245: SetLogUploadSettings(false); On ...
5 years, 1 month ago (2015-11-03 19:46:18 UTC) #29
Alexei Svitkine (slow)
https://codereview.chromium.org/1411863002/diff/280001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/1411863002/diff/280001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode2167 chrome/browser/ui/webui/options/browser_options_handler.cc:2167: if (!IsDeviceOwnerProfile() || IsMetricsReportingPolicyManaged()) { Add a comment please. ...
5 years, 1 month ago (2015-11-03 19:55:25 UTC) #30
gayane -on leave until 09-2017
https://codereview.chromium.org/1411863002/diff/280001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/1411863002/diff/280001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode2167 chrome/browser/ui/webui/options/browser_options_handler.cc:2167: if (!IsDeviceOwnerProfile() || IsMetricsReportingPolicyManaged()) { On 2015/11/03 19:55:24, Alexei ...
5 years, 1 month ago (2015-11-03 21:54:22 UTC) #31
Alexei Svitkine (slow)
https://codereview.chromium.org/1411863002/diff/300001/chrome/browser/metrics/metrics_reporting_state.cc File chrome/browser/metrics/metrics_reporting_state.cc (right): https://codereview.chromium.org/1411863002/diff/300001/chrome/browser/metrics/metrics_reporting_state.cc#newcode89 chrome/browser/metrics/metrics_reporting_state.cc:89: void onDeviceSettingChange() { Nit: Capitalize. Also, add a comment. ...
5 years, 1 month ago (2015-11-03 23:18:23 UTC) #32
Alexei Svitkine (slow)
5 years, 1 month ago (2015-11-03 23:18:24 UTC) #33
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1411863002/diff/260001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/1411863002/diff/260001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode2173 chrome/browser/ui/webui/options/browser_options_handler.cc:2173: InitiateMetricsReportingChange( On 2015/11/03 19:46:17, gayane wrote: > On 2015/11/03 ...
5 years, 1 month ago (2015-11-04 09:22:58 UTC) #34
gayane -on leave until 09-2017
asvitkine@ address all the comments mnissler@ I have reverted back the change you asked for ...
5 years, 1 month ago (2015-11-05 18:53:32 UTC) #35
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/1411863002/diff/340001/chrome/browser/metrics/metrics_reporting_state.cc File chrome/browser/metrics/metrics_reporting_state.cc (right): https://codereview.chromium.org/1411863002/diff/340001/chrome/browser/metrics/metrics_reporting_state.cc#newcode89 chrome/browser/metrics/metrics_reporting_state.cc:89: // Callback function for Chrome OS device settings ...
5 years, 1 month ago (2015-11-05 20:20:00 UTC) #36
Mattias Nissler (ping if slow)
LGTM after adjusting the comment. https://codereview.chromium.org/1411863002/diff/340001/chrome/browser/ui/webui/options/browser_options_handler.cc File chrome/browser/ui/webui/options/browser_options_handler.cc (right): https://codereview.chromium.org/1411863002/diff/340001/chrome/browser/ui/webui/options/browser_options_handler.cc#newcode2180 chrome/browser/ui/webui/options/browser_options_handler.cc:2180: // OS. Sorry, but ...
5 years, 1 month ago (2015-11-06 13:05:09 UTC) #37
gayane -on leave until 09-2017
Thanks for the comments. https://codereview.chromium.org/1411863002/diff/340001/chrome/browser/metrics/metrics_reporting_state.cc File chrome/browser/metrics/metrics_reporting_state.cc (right): https://codereview.chromium.org/1411863002/diff/340001/chrome/browser/metrics/metrics_reporting_state.cc#newcode89 chrome/browser/metrics/metrics_reporting_state.cc:89: // Callback function for Chrome ...
5 years, 1 month ago (2015-11-06 21:41:13 UTC) #39
gayane -on leave until 09-2017
bartfab@chromium.org: Please review changes in chrome/browser/policy/configuration_policy_handler_list_factory.cc thakis@chromium.org: Please review changes in chrome/browser/browser_process_impl.cc chrome/browser/profiles/* chrome/browser/resources/* chrome/browser/ui/webui/*
5 years, 1 month ago (2015-11-06 21:48:32 UTC) #41
Nico
rs-lgtm based on mnissler's review
5 years, 1 month ago (2015-11-06 22:50:05 UTC) #42
gayane -on leave until 09-2017
+cschuet for configuration_policy_handler_list_factory.cc OWNERS review
5 years, 1 month ago (2015-11-13 19:25:59 UTC) #45
cschuet (SLOW)
On 2015/11/13 19:25:59, gayane wrote: > +cschuet for configuration_policy_handler_list_factory.cc OWNERS review LGTM
5 years, 1 month ago (2015-11-16 19:55:43 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411863002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411863002/380001
5 years, 1 month ago (2015-11-16 20:08:30 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/30472)
5 years, 1 month ago (2015-11-16 20:13:02 UTC) #51
gayane -on leave until 09-2017
I have added a default value for kStatsReporingPref device setting to fix failing browser_tests. This ...
5 years, 1 month ago (2015-11-19 20:56:49 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411863002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411863002/400001
5 years, 1 month ago (2015-11-19 20:58:04 UTC) #55
commit-bot: I haz the power
Committed patchset #15 (id:400001)
5 years, 1 month ago (2015-11-19 21:06:40 UTC) #56
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/e7e32dc0a88082d9fa8a85cca1eb36d74cc1966d Cr-Commit-Position: refs/heads/master@{#360657}
5 years, 1 month ago (2015-11-19 21:07:03 UTC) #57
Alexei Svitkine (slow)
Just a tip for future CLs: when rebasing and also making changes, upload a patchset ...
5 years, 1 month ago (2015-11-19 21:19:44 UTC) #58
gayane -on leave until 09-2017
5 years, 1 month ago (2015-11-19 21:24:05 UTC) #59
Message was sent while issue was closed.
On 2015/11/19 21:19:44, Alexei Svitkine (slow) wrote:
> Just a tip for future CLs: when rebasing and also making changes, upload a
> patchset just after the rebase before you make any new changes. Then, upload a
> patchset with the extra changes.
> 
> Otherwise, it makes it hard for reviewers to see in the tool which changes
> between patchset are yours and which came from the rebase. (e.g. if I diff
> between patchset 15 and patchset 14 here).
> 
> No worries this time, but a suggestion for next time.

Ah, sorry. Forgot that I synced.

Powered by Google App Engine
This is Rietveld 408576698