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

Issue 333193002: Adding a SW reporter component updater (Closed)

Created:
6 years, 6 months ago by MAD
Modified:
6 years, 6 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, asvitkine+watch_chromium.org, cpu_(ooo_6.6-7.5), waffles
Project:
chromium
Visibility:
Public.

Description

Adding a SW reporter component updater. This is a special component that only gets registered when the user reset the profile settings and has enabled UMA reporting. Once installed (or if already installed), the component is executed and it's exit code is reported via UMA. In case the component doesn't have time to be installed and executed before Chrome exits, a local state pref identifies that we have a pending registration or execution so that it can be continued on next Chrome startup. BUG=377601 R=asvitkine@chromium.org, battre@chromium.org, jhawkins@chromium.org, robertshield@chromium.org, sorin@chromium.org, waffles@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278820

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Fixed tests compile errors #

Patch Set 3 : CRComments 1 #

Patch Set 4 : Support no local state in tests #

Total comments: 4

Patch Set 5 : CamelCase for histogram names #

Total comments: 11

Patch Set 6 : More CR Comments related to UMA #

Patch Set 7 : Rebased to ToT. #

Patch Set 8 : Now delete the reporter once it's done. #

Total comments: 4

Patch Set 9 : OWNER Nit fix in profile resetter. (and a small change to process handle close in component) #

Total comments: 5

Patch Set 10 : New version not deleting nor re-registering. #

Patch Set 11 : Fixed execution bug... #

Total comments: 14

Patch Set 12 : Now using DefaultComponentInstaller. #

Patch Set 13 : cpu's initial comments... #

Patch Set 14 : Improved retry accounting... #

Total comments: 6

Patch Set 15 : Added some comments. #

Total comments: 4

Patch Set 16 : Sync'd to ToT...\ #

Patch Set 17 : Sync'd to ToT again (previous upload failed halfway). #

Total comments: 16

Patch Set 18 : Better usage of component updater #

Patch Set 19 : A few tweaks here in there... #

Patch Set 20 : Prevent re-registration. #

Total comments: 2

Patch Set 21 : Small change DCHECK() -> clear() #

Total comments: 18

Patch Set 22 : More OWNER comments, using a bool, before changing it back to cus->GetIDs #

Total comments: 12

Patch Set 23 : Bringing back ID instead of static bool. #

Total comments: 16

Patch Set 24 : Mainly nit fixes and one bug fix. #

Patch Set 25 : Don't return after getting registry exit code #

Patch Set 26 : Fixed a regitration condition. #

Patch Set 27 : Better handling of startup registration #

Total comments: 1

Patch Set 28 : Merged in ToT. #

Patch Set 29 : Merged to ToT. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+407 lines, -23 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/browser/component_updater/sw_reporter_installer_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/component_updater/sw_reporter_installer_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +276 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -8 lines 0 comments Download
M chrome/browser/profile_resetter/profile_resetter.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/profile_resetter/profile_resetter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +29 lines, -11 lines 0 comments Download
M chrome/browser/profile_resetter/profile_resetter_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/reset_profile_settings_handler.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +7 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 3 chunks +28 lines, -3 lines 0 comments Download

Messages

Total messages: 44 (0 generated)
MAD
Can you take a first pass at this before I ask OWNERs to confirm it's ...
6 years, 6 months ago (2014-06-16 01:22:05 UTC) #1
robertshield
Quick initial pass, looks really good. Couple of questions and the like. https://codereview.chromium.org/333193002/diff/20001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc File chrome/browser/component_updater/sw_reporter_component_installer_win.cc ...
6 years, 6 months ago (2014-06-16 03:47:53 UTC) #2
MAD
How about this now? Thanks! BYE MAD... https://codereview.chromium.org/333193002/diff/20001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc File chrome/browser/component_updater/sw_reporter_component_installer_win.cc (right): https://codereview.chromium.org/333193002/diff/20001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc#newcode199 chrome/browser/component_updater/sw_reporter_component_installer_win.cc:199: base::PathExists(new_version_path) || ...
6 years, 6 months ago (2014-06-16 13:03:55 UTC) #3
MAD
Made some changes to fix issues found by try bot. Can you do one last ...
6 years, 6 months ago (2014-06-16 17:49:54 UTC) #4
robertshield
lgtm https://codereview.chromium.org/333193002/diff/80001/chrome/browser/profile_resetter/profile_resetter.h File chrome/browser/profile_resetter/profile_resetter.h (right): https://codereview.chromium.org/333193002/diff/80001/chrome/browser/profile_resetter/profile_resetter.h#newcode67 chrome/browser/profile_resetter/profile_resetter.h:67: bool accepted_send_feedback, could we use an enum here ...
6 years, 6 months ago (2014-06-16 19:42:55 UTC) #5
MAD
Thanks... Answered! Will now move on to OWNERS review... BYE MAD https://codereview.chromium.org/333193002/diff/80001/chrome/browser/profile_resetter/profile_resetter.h File chrome/browser/profile_resetter/profile_resetter.h (right): ...
6 years, 6 months ago (2014-06-16 19:47:43 UTC) #6
MAD
OWNER reviews: cpu@: chrome\browser\component_updater\* battre@ chrome\browser\profile_resetter\* chrome\browser\prefs\browser_prefs.cc asvitkine@: tools\metrics\histograms\histograms.xml cpu@: chrome\browser\component_updater\* TBR=jhawkins@chromium.org chrome/browser/chrome_browser_main.cc chrome/browser/ui/webui/options/reset_profile_settings_handler.cc Thanks! ...
6 years, 6 months ago (2014-06-16 19:58:09 UTC) #7
Alexei Svitkine (slow)
https://codereview.chromium.org/333193002/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/333193002/diff/80001/tools/metrics/histograms/histograms.xml#newcode2671 tools/metrics/histograms/histograms.xml:2671: +<histogram name="component_updater.SwReporter" enum="SwReporter"> Is there a reason you're using ...
6 years, 6 months ago (2014-06-16 20:07:26 UTC) #8
MAD
Thanks! Next... :-) BYE MAD https://codereview.chromium.org/333193002/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/333193002/diff/80001/tools/metrics/histograms/histograms.xml#newcode2671 tools/metrics/histograms/histograms.xml:2671: +<histogram name="component_updater.SwReporter" enum="SwReporter"> On ...
6 years, 6 months ago (2014-06-16 20:36:14 UTC) #9
Alexei Svitkine (slow)
https://codereview.chromium.org/333193002/diff/100001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc File chrome/browser/component_updater/sw_reporter_component_installer_win.cc (right): https://codereview.chromium.org/333193002/diff/100001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc#newcode45 chrome/browser/component_updater/sw_reporter_component_installer_win.cc:45: enum { Name this enum. https://codereview.chromium.org/333193002/diff/100001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc#newcode54 chrome/browser/component_updater/sw_reporter_component_installer_win.cc:54: }; Add ...
6 years, 6 months ago (2014-06-16 21:50:06 UTC) #10
MAD
Thanks... How about this now? BYE MAD https://codereview.chromium.org/333193002/diff/100001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc File chrome/browser/component_updater/sw_reporter_component_installer_win.cc (right): https://codereview.chromium.org/333193002/diff/100001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc#newcode45 chrome/browser/component_updater/sw_reporter_component_installer_win.cc:45: enum { ...
6 years, 6 months ago (2014-06-17 01:03:37 UTC) #11
MAD
Friendly ping for OWNER reviews from cpu@ chrome\browser\component_updater\* and battre@ chrome\browser\profile_resetter\* chrome\browser\prefs\browser_prefs.cc Alexei, are you ...
6 years, 6 months ago (2014-06-17 14:48:56 UTC) #12
Alexei Svitkine (slow)
histograms lgtm, thanks! https://codereview.chromium.org/333193002/diff/100001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc File chrome/browser/component_updater/sw_reporter_component_installer_win.cc (right): https://codereview.chromium.org/333193002/diff/100001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc#newcode234 chrome/browser/component_updater/sw_reporter_component_installer_win.cc:234: base::WorkerPool::PostTask( On 2014/06/17 01:03:37, MAD wrote: ...
6 years, 6 months ago (2014-06-17 15:01:52 UTC) #13
battre
LGTM for chrome\browser\profile_resetter\* chrome\browser\prefs\browser_prefs.cc https://codereview.chromium.org/333193002/diff/160001/chrome/browser/profile_resetter/profile_resetter.cc File chrome/browser/profile_resetter/profile_resetter.cc (right): https://codereview.chromium.org/333193002/diff/160001/chrome/browser/profile_resetter/profile_resetter.cc#newcode127 chrome/browser/profile_resetter/profile_resetter.cc:127: // When the user resets ...
6 years, 6 months ago (2014-06-17 15:09:46 UTC) #14
MAD
Thanks, done and explained... Next? :-) BYE MAD https://codereview.chromium.org/333193002/diff/160001/chrome/browser/profile_resetter/profile_resetter.cc File chrome/browser/profile_resetter/profile_resetter.cc (right): https://codereview.chromium.org/333193002/diff/160001/chrome/browser/profile_resetter/profile_resetter.cc#newcode127 chrome/browser/profile_resetter/profile_resetter.cc:127: // ...
6 years, 6 months ago (2014-06-17 15:26:31 UTC) #15
James Hawkins
lgtm
6 years, 6 months ago (2014-06-17 15:48:45 UTC) #16
waffles
https://codereview.chromium.org/333193002/diff/180001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc File chrome/browser/component_updater/sw_reporter_component_installer_win.cc (right): https://codereview.chromium.org/333193002/diff/180001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc#newcode159 chrome/browser/component_updater/sw_reporter_component_installer_win.cc:159: class SwReporterComponentInstaller : public ComponentInstaller { I think you ...
6 years, 6 months ago (2014-06-17 23:30:11 UTC) #17
MAD
OK, I'll give this a try... I just uploaded a new version that doesn't delete ...
6 years, 6 months ago (2014-06-17 23:51:10 UTC) #18
cpu_(ooo_6.6-7.5)
ok, review time. First off please have a more meaninful CL description, at least what ...
6 years, 6 months ago (2014-06-18 01:16:11 UTC) #19
MAD
Thanks for the suggestion, can I ask you to do the OWNER review then? cpu@ ...
6 years, 6 months ago (2014-06-18 01:38:49 UTC) #20
MAD
Oups, sorry Carlos, I had not seen that you were looking at the CL, I ...
6 years, 6 months ago (2014-06-18 01:40:28 UTC) #21
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/333193002/diff/220001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc File chrome/browser/component_updater/sw_reporter_component_installer_win.cc (right): https://codereview.chromium.org/333193002/diff/220001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc#newcode58 chrome/browser/component_updater/sw_reporter_component_installer_win.cc:58: // hashlib.sha256().update(open(".crx").read()[16:16+294]).digest(). a comment with python in a c++ ...
6 years, 6 months ago (2014-06-18 01:58:36 UTC) #22
MAD
Addressed CPU's comments... Some more? Thanks! BYE MAD https://codereview.chromium.org/333193002/diff/220001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc File chrome/browser/component_updater/sw_reporter_component_installer_win.cc (right): https://codereview.chromium.org/333193002/diff/220001/chrome/browser/component_updater/sw_reporter_component_installer_win.cc#newcode58 chrome/browser/component_updater/sw_reporter_component_installer_win.cc:58: // ...
6 years, 6 months ago (2014-06-18 14:49:53 UTC) #23
MAD
Improved the retry accounting... BYE MAD
6 years, 6 months ago (2014-06-18 15:18:55 UTC) #24
cpu_(ooo_6.6-7.5)
I don't see anything particularly wrong but I want to do one final pass after ...
6 years, 6 months ago (2014-06-19 01:33:22 UTC) #25
MAD
OK, cool, thanks cpu... waffles@, do you have time to review this soonish? Would be ...
6 years, 6 months ago (2014-06-19 02:00:18 UTC) #26
MAD
Added some minor comments about the worker pool usage. Also replaced waffles@ and cpu2 with ...
6 years, 6 months ago (2014-06-19 16:08:18 UTC) #27
waffles
Hi MAD, just to restate what I said in the meeting, comments on the current ...
6 years, 6 months ago (2014-06-19 17:50:54 UTC) #28
Sorin Jianu
Thank you MAD. Many of these comments overlap with previous comments, with other people's comments, ...
6 years, 6 months ago (2014-06-19 19:08:49 UTC) #29
MAD
OK, I think I addressed all issues... I tested that it works when the component ...
6 years, 6 months ago (2014-06-19 21:31:51 UTC) #30
MAD
Uploaded new version which prevents re-registration... Have not fully tested it yet, will test it ...
6 years, 6 months ago (2014-06-19 22:30:28 UTC) #31
Sorin Jianu
Marc, we are getting close to the end of this. Two issues: static members of ...
6 years, 6 months ago (2014-06-20 00:31:43 UTC) #32
MAD
All addressed... Hoping I didn't make too many typos... It's getting a bit late here... ...
6 years, 6 months ago (2014-06-20 04:51:59 UTC) #33
Sorin Jianu
Thank you Marc. Getting the correct logic in the ExecutePendingSwReporter is key. I think we ...
6 years, 6 months ago (2014-06-20 05:09:58 UTC) #34
Sorin Jianu
Thank you Marc. We just need to make sure the logic of registration at startup ...
6 years, 6 months ago (2014-06-20 05:37:39 UTC) #35
MAD
Getting close... Cool... Thanks again! How about this now? BYE MAD https://codereview.chromium.org/333193002/diff/450001/chrome/browser/component_updater/sw_reporter_installer_win.cc File chrome/browser/component_updater/sw_reporter_installer_win.cc (right): ...
6 years, 6 months ago (2014-06-20 14:40:15 UTC) #36
MAD
Getting close... Cool... Thanks again! How about this now? BYE MAD
6 years, 6 months ago (2014-06-20 14:40:16 UTC) #37
waffles
LGTM Thanks very much for putting up with us! https://codereview.chromium.org/333193002/diff/540001/chrome/browser/component_updater/sw_reporter_installer_win.cc File chrome/browser/component_updater/sw_reporter_installer_win.cc (right): https://codereview.chromium.org/333193002/diff/540001/chrome/browser/component_updater/sw_reporter_installer_win.cc#newcode228 chrome/browser/component_updater/sw_reporter_installer_win.cc:228: ...
6 years, 6 months ago (2014-06-20 17:20:53 UTC) #38
Sorin Jianu
lgtm Thank you very much for putting up with ME!
6 years, 6 months ago (2014-06-20 17:23:13 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mad@chromium.org/333193002/540001
6 years, 6 months ago (2014-06-20 17:26:33 UTC) #40
MAD
Uploaded ToT merged patch, and launched tries on it... Fingers croassed Thanks again everyone for ...
6 years, 6 months ago (2014-06-20 17:42:45 UTC) #41
MAD
The CQ bit was checked by mad@chromium.org
6 years, 6 months ago (2014-06-20 18:35:41 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mad@chromium.org/333193002/560001
6 years, 6 months ago (2014-06-20 19:03:53 UTC) #43
MAD
6 years, 6 months ago (2014-06-20 21:20:06 UTC) #44
Message was sent while issue was closed.
Committed patchset #29 manually as r278820 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698