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

Issue 2898063002: Hold cros_component_installers in browser_process. (Closed)

Created:
3 years, 7 months ago by xiaochu
Modified:
3 years, 7 months ago
CC:
adlr, chromium-reviews, ketakid1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Hold cros_component_installers in browser_process. Create a factory method to create and hold installers for chrome os components. We add this since we need to query info from components. Since these info are already in memory, it is inefficient load and search in hard drive every time (and the complexity of doing so is pretty prohibitive). BUG=chromium:690521 TEST= 1) unit test: cros_component_installer_unittest.cc, 2)run on a chromebook and register a component successfully. Review-Url: https://codereview.chromium.org/2898063002 Cr-Commit-Position: refs/heads/master@{#474798} Committed: https://chromium.googlesource.com/chromium/src/+/be8885d7172d99cd8fff3a6782bd2aeac4a10371

Patch Set 1 #

Patch Set 2 : update commit message #

Total comments: 4

Patch Set 3 : add unit test #

Patch Set 4 : update commit message. #

Total comments: 2

Patch Set 5 : move to browser_process_platform_part #

Patch Set 6 : remove empty line. #

Patch Set 7 : rename function #

Patch Set 8 : update unit test #

Patch Set 9 : switch to smart pointer #

Total comments: 4

Patch Set 10 : use CrOSComponentInstaller inherited from DefaultComponentInstaller #

Patch Set 11 : address comments from sky #

Patch Set 12 : trim code #

Total comments: 8

Patch Set 13 : address comments from sky&waffles #

Patch Set 14 : trim code #

Patch Set 15 : update unit test #

Patch Set 16 : address comments from waffles #

Patch Set 17 : remove unused headers #

Patch Set 18 : new line between 5/6 #

Total comments: 4

Patch Set 19 : address comments from waffles #

Total comments: 2

Patch Set 20 : address comments from sky #

Patch Set 21 : update unittest #

Patch Set 22 : update unittest #

Patch Set 23 : update unittest #

Patch Set 24 : update unittest #

Total comments: 2

Patch Set 25 : address comments from sky #

Patch Set 26 : remove dead code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -1 line) Patch
M chrome/browser/browser_process_platform_part_chromeos.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_platform_part_chromeos.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 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/component_updater/cros_component_installer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -1 line 0 comments Download
A chrome/browser/component_updater/cros_component_installer_unittest.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 1 chunk +105 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 57 (31 generated)
xiaochu
On 2017/05/22 22:31:05, xiaochu wrote: > mailto:xiaochu@chromium.org changed reviewers: > + mailto:sky@chromium.org Can you please ...
3 years, 7 months ago (2017-05-22 23:31:12 UTC) #5
jochen (gone - plz use gerrit)
it's not clear to me what this tries to achieve. Could you please share a ...
3 years, 7 months ago (2017-05-23 11:22:03 UTC) #6
xiaochu
On 2017/05/23 11:22:03, jochen wrote: > it's not clear to me what this tries to ...
3 years, 7 months ago (2017-05-23 20:21:19 UTC) #7
sky
https://codereview.chromium.org/2898063002/diff/20001/chrome/browser/browser_process.h File chrome/browser/browser_process.h (right): https://codereview.chromium.org/2898063002/diff/20001/chrome/browser/browser_process.h#newcode294 chrome/browser/browser_process.h:294: #if defined(OS_CHROMEOS) Can this be moved to browser_process_platform_part_chromeos? https://codereview.chromium.org/2898063002/diff/20001/chrome/browser/browser_process.h#newcode296 ...
3 years, 7 months ago (2017-05-23 20:22:24 UTC) #9
waffles
sky@ and jochen@: this CL represents one suggestion I made to xiaochu about how to ...
3 years, 7 months ago (2017-05-23 20:40:14 UTC) #10
xiaochu
Thanks for clarifying the problem, waffles@! I'm trying to save a reference to some data ...
3 years, 7 months ago (2017-05-23 21:31:59 UTC) #11
sky
On 2017/05/23 20:40:14, waffles wrote: > sky@ and jochen@: this CL represents one suggestion I ...
3 years, 7 months ago (2017-05-23 23:20:24 UTC) #12
sky
https://codereview.chromium.org/2898063002/diff/160001/chrome/browser/browser_process_platform_part_chromeos.cc File chrome/browser/browser_process_platform_part_chromeos.cc (right): https://codereview.chromium.org/2898063002/diff/160001/chrome/browser/browser_process_platform_part_chromeos.cc#newcode163 chrome/browser/browser_process_platform_part_chromeos.cc:163: scoped_refptr<component_updater::DefaultComponentInstaller> Style guide says position definition and declaration position ...
3 years, 7 months ago (2017-05-23 23:20:30 UTC) #13
xiaochu
Thanks! The original ownership model (not strict) should be ComponentUpdateService owns DefaultComponentInstaller which owns CrOSComponentTraits. ...
3 years, 7 months ago (2017-05-23 23:40:52 UTC) #14
waffles
OK; looking at this I would rather we not introduce a subclass of DCI. Rather ...
3 years, 7 months ago (2017-05-24 16:46:06 UTC) #15
sky
https://codereview.chromium.org/2898063002/diff/220001/chrome/browser/browser_process_platform_part_chromeos.h File chrome/browser/browser_process_platform_part_chromeos.h (right): https://codereview.chromium.org/2898063002/diff/220001/chrome/browser/browser_process_platform_part_chromeos.h#newcode139 chrome/browser/browser_process_platform_part_chromeos.h:139: std::map<std::string, include <map> and <string> https://codereview.chromium.org/2898063002/diff/220001/chrome/browser/component_updater/cros_component_installer_unittest.cc File chrome/browser/component_updater/cros_component_installer_unittest.cc (right): ...
3 years, 7 months ago (2017-05-24 16:47:20 UTC) #16
jochen (gone - plz use gerrit)
thanks for sharing the design doc. I see that sky@ started the actual review, so ...
3 years, 7 months ago (2017-05-24 19:42:11 UTC) #17
xiaochu
Thanks! waffles@ I removed subclass. In BPPP, I added a map from 'name' to manifest. ...
3 years, 7 months ago (2017-05-24 19:56:55 UTC) #18
waffles
On 2017/05/24 19:56:55, xiaochu wrote: > Thanks! > > waffles@ I removed subclass. In BPPP, ...
3 years, 7 months ago (2017-05-24 20:26:58 UTC) #19
xiaochu
Thanks! I get it now. The changes are made.
3 years, 7 months ago (2017-05-24 20:46:23 UTC) #20
waffles
lgtm I'm OK with this if sky is. https://codereview.chromium.org/2898063002/diff/340001/chrome/browser/browser_process_platform_part_chromeos.cc File chrome/browser/browser_process_platform_part_chromeos.cc (right): https://codereview.chromium.org/2898063002/diff/340001/chrome/browser/browser_process_platform_part_chromeos.cc#newcode174 chrome/browser/browser_process_platform_part_chromeos.cc:174: } ...
3 years, 7 months ago (2017-05-24 21:14:36 UTC) #21
xiaochu
Thanks! https://codereview.chromium.org/2898063002/diff/340001/chrome/browser/browser_process_platform_part_chromeos.cc File chrome/browser/browser_process_platform_part_chromeos.cc (right): https://codereview.chromium.org/2898063002/diff/340001/chrome/browser/browser_process_platform_part_chromeos.cc#newcode174 chrome/browser/browser_process_platform_part_chromeos.cc:174: } On 2017/05/24 21:14:35, waffles wrote: > Just ...
3 years, 7 months ago (2017-05-24 21:35:37 UTC) #22
sky
https://codereview.chromium.org/2898063002/diff/360001/chrome/browser/browser_process_platform_part_chromeos.h File chrome/browser/browser_process_platform_part_chromeos.h (right): https://codereview.chromium.org/2898063002/diff/360001/chrome/browser/browser_process_platform_part_chromeos.h#newcode133 chrome/browser/browser_process_platform_part_chromeos.h:133: std::vector<std::string> compatible_cros_components_; Given your usage, wouldn't a std::set be ...
3 years, 7 months ago (2017-05-25 02:25:50 UTC) #23
xiaochu
Thanks! https://codereview.chromium.org/2898063002/diff/360001/chrome/browser/browser_process_platform_part_chromeos.h File chrome/browser/browser_process_platform_part_chromeos.h (right): https://codereview.chromium.org/2898063002/diff/360001/chrome/browser/browser_process_platform_part_chromeos.h#newcode133 chrome/browser/browser_process_platform_part_chromeos.h:133: std::vector<std::string> compatible_cros_components_; On 2017/05/25 02:25:50, sky wrote: > ...
3 years, 7 months ago (2017-05-25 02:40:45 UTC) #24
sky
LGTM https://codereview.chromium.org/2898063002/diff/460001/chrome/browser/browser_process_platform_part_chromeos.cc File chrome/browser/browser_process_platform_part_chromeos.cc (right): https://codereview.chromium.org/2898063002/diff/460001/chrome/browser/browser_process_platform_part_chromeos.cc#newcode165 chrome/browser/browser_process_platform_part_chromeos.cc:165: return it != compatible_cros_components_.end(); return compatible_cros_components_.count(name) > 0
3 years, 7 months ago (2017-05-25 18:03:50 UTC) #39
xiaochu
Thanks! https://codereview.chromium.org/2898063002/diff/460001/chrome/browser/browser_process_platform_part_chromeos.cc File chrome/browser/browser_process_platform_part_chromeos.cc (right): https://codereview.chromium.org/2898063002/diff/460001/chrome/browser/browser_process_platform_part_chromeos.cc#newcode165 chrome/browser/browser_process_platform_part_chromeos.cc:165: return it != compatible_cros_components_.end(); On 2017/05/25 18:03:50, sky ...
3 years, 7 months ago (2017-05-25 18:12:30 UTC) #40
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/2898063002/500001
3 years, 7 months ago (2017-05-25 20:48:09 UTC) #51
commit-bot: I haz the power
Committed patchset #26 (id:500001) as https://chromium.googlesource.com/chromium/src/+/be8885d7172d99cd8fff3a6782bd2aeac4a10371
3 years, 7 months ago (2017-05-25 20:54:07 UTC) #54
findit-for-me
Findit (https://goo.gl/kROfz5) identified this CL at revision 474798 as the culprit for failures in the ...
3 years, 7 months ago (2017-05-26 00:25:47 UTC) #55
xiaochu
On 2017/05/26 00:25:47, findit-for-me wrote: > Findit (https://goo.gl/kROfz5) identified this CL at revision 474798 as ...
3 years, 7 months ago (2017-05-26 00:29:51 UTC) #56
xiaochu
3 years, 7 months ago (2017-05-26 00:35:21 UTC) #57
Message was sent while issue was closed.
On 2017/05/26 00:29:51, xiaochu wrote:
> On 2017/05/26 00:25:47, findit-for-me wrote:
> > Findit (https://goo.gl/kROfz5) identified this CL at revision 474798 as the
> > culprit for
> > failures in the build cycles as shown on:
> >
>
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3Itb...
> 
> Unittest has a raw pointer which causes memory lea. Working on a fix.

Fix is here: https://codereview.chromium.org/2902373003

Powered by Google App Engine
This is Rietveld 408576698