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

Issue 2707063002: Universial component install for chrome os. (Closed)

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

Description

Universial component install for chrome os. Adding a component installer for all chrome os components. It is invoked with a component name and then it looks up this component in a configuration file (https://chromium.googlesource.com/chromiumos/platform2/+/master/cros_component/cros_component.config). If this file exists, valid and this component is in the file, then this component got registered. Otherwise, nothing happens. Support key per component. Each key is also stored in config file. format of this key is verified when it is parsed. unit test includes component_update_service on any platform and config file parsing on chrome os to cover many cases. BUG=690521, 694731 TEST=cros_component_installer_unittest tests the configuration file parser on chrome os. Component registeration itself is tested on a chrome device. Review-Url: https://codereview.chromium.org/2707063002 Cr-Commit-Position: refs/heads/master@{#454650} Committed: https://chromium.googlesource.com/chromium/src/+/4c9aa5146e5df6682b3fa25e050571c18fd127e6

Patch Set 1 #

Total comments: 12

Patch Set 2 : change configuration file name. #

Patch Set 3 : fix to waffles coment #

Patch Set 4 : remove TODO. #

Patch Set 5 : switch from xml to json config file + update unit test #

Patch Set 6 : small fix to last cl #

Patch Set 7 : Add an example config file content in comment. #

Patch Set 8 : move config file path to a const static variable. #

Patch Set 9 : more checks on configuration file #

Patch Set 10 : fix a bug #

Total comments: 11

Patch Set 11 : fix according to waffles comment. #

Patch Set 12 : rename internal function. #

Patch Set 13 : remove comment #

Patch Set 14 : add comment for usage in details. #

Total comments: 8

Patch Set 15 : Fix according to waffles' comment #

Patch Set 16 : use the blocking thread from ComponentUpdateService instead of creating a new one #

Patch Set 17 : remove unnecessary headers #

Total comments: 14

Patch Set 18 : addressing comments from waffles #

Patch Set 19 : more fix #

Patch Set 20 : remove commented code #

Patch Set 21 : more removal #

Patch Set 22 : disable dynamic configuration loading #

Total comments: 6

Patch Set 23 : switch from json to std::map for static configuration #

Total comments: 16

Patch Set 24 : address comments from waffles #

Total comments: 21

Patch Set 25 : address comments from sorin #

Total comments: 16

Patch Set 26 : address comments from sorin #

Patch Set 27 : build unit_test only on chromeos #

Unified diffs Side-by-side diffs Delta from patch set Stats (+299 lines, -0 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/component_updater/cros_component_installer.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 1 chunk +66 lines, -0 lines 0 comments Download
A 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 19 20 21 22 23 24 25 1 chunk +168 lines, -0 lines 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 24 25 1 chunk +61 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn 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 +2 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (14 generated)
xiaochu
I moved this commit to another local cl to modify (need an updated version of ...
3 years, 10 months ago (2017-02-21 17:12:53 UTC) #2
waffles
https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc#newcode18 chrome/browser/component_updater/cros_component_installer.cc:18: 0xe7, 0x08, 0xe6, 0x93, 0x2d, 0x13, 0x5d, 0x8a}; Delete ...
3 years, 10 months ago (2017-02-21 21:16:04 UTC) #3
xiaochu
On 2017/02/21 21:16:04, waffles wrote: > https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc > File chrome/browser/component_updater/cros_component_installer.cc (right): > > https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc#newcode18 > ...
3 years, 10 months ago (2017-02-21 21:36:41 UTC) #4
waffles
https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc#newcode103 chrome/browser/component_updater/cros_component_installer.cc:103: // TODO: verify installation. On 2017/02/21 21:16:03, waffles wrote: ...
3 years, 10 months ago (2017-02-21 21:39:26 UTC) #5
xiaochu
Sorry, didn't reply again. https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc#newcode18 chrome/browser/component_updater/cros_component_installer.cc:18: 0xe7, 0x08, 0xe6, 0x93, 0x2d, ...
3 years, 10 months ago (2017-02-21 21:39:40 UTC) #6
xiaochu
Sorry, didn't reply again. https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc#newcode18 chrome/browser/component_updater/cros_component_installer.cc:18: 0xe7, 0x08, 0xe6, 0x93, 0x2d, ...
3 years, 10 months ago (2017-02-21 21:39:40 UTC) #7
xiaochu
On 2017/02/21 21:39:26, waffles wrote: > https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc > File chrome/browser/component_updater/cros_component_installer.cc (right): > > https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.cc#newcode103 > ...
3 years, 10 months ago (2017-02-21 21:41:21 UTC) #8
waffles
https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.h File chrome/browser/component_updater/cros_component_installer.h (right): https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.h#newcode67 chrome/browser/component_updater/cros_component_installer.h:67: // </components> On 2017/02/21 21:39:40, xiaochu wrote: > On ...
3 years, 10 months ago (2017-02-21 21:52:13 UTC) #9
xiaochu
On 2017/02/21 21:52:13, waffles wrote: > https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.h > File chrome/browser/component_updater/cros_component_installer.h (right): > > https://codereview.chromium.org/2707063002/diff/1/chrome/browser/component_updater/cros_component_installer.h#newcode67 > ...
3 years, 10 months ago (2017-02-22 00:33:16 UTC) #10
waffles
https://codereview.chromium.org/2707063002/diff/180001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/180001/chrome/browser/component_updater/cros_component_installer.cc#newcode136 chrome/browser/component_updater/cros_component_installer.cc:136: // [ If you always are using the name ...
3 years, 10 months ago (2017-02-23 17:13:20 UTC) #13
xiaochu
Dones. https://codereview.chromium.org/2707063002/diff/180001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/180001/chrome/browser/component_updater/cros_component_installer.cc#newcode136 chrome/browser/component_updater/cros_component_installer.cc:136: // [ On 2017/02/23 17:13:20, waffles wrote: > ...
3 years, 10 months ago (2017-02-23 20:54:56 UTC) #14
xiaochu
https://codereview.chromium.org/2707063002/diff/180001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/180001/chrome/browser/component_updater/cros_component_installer.cc#newcode146 chrome/browser/component_updater/cros_component_installer.cc:146: JSONFileValueDeserializer deserializer(configFilePath); On 2017/02/23 20:54:56, xiaochu wrote: > On ...
3 years, 9 months ago (2017-02-25 23:39:22 UTC) #16
waffles
https://codereview.chromium.org/2707063002/diff/260001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/260001/chrome/browser/component_updater/cros_component_installer.cc#newcode129 chrome/browser/component_updater/cros_component_installer.cc:129: installer->Register(cus, base::Closure()); Since installer->Register must be called on the ...
3 years, 9 months ago (2017-02-28 17:37:21 UTC) #17
xiaochu
dones. https://codereview.chromium.org/2707063002/diff/260001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/260001/chrome/browser/component_updater/cros_component_installer.cc#newcode129 chrome/browser/component_updater/cros_component_installer.cc:129: installer->Register(cus, base::Closure()); On 2017/02/28 17:37:21, waffles wrote: > ...
3 years, 9 months ago (2017-02-28 23:20:33 UTC) #18
waffles
https://codereview.chromium.org/2707063002/diff/320001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/320001/chrome/browser/component_updater/cros_component_installer.cc#newcode173 chrome/browser/component_updater/cros_component_installer.cc:173: "component " Why not combine with the above line? ...
3 years, 9 months ago (2017-03-01 18:49:20 UTC) #19
xiaochu
Config is constructed as a factory class. Code is tested on Chromebook and working correctly. ...
3 years, 9 months ago (2017-03-02 01:50:06 UTC) #20
xiaochu
On 2017/03/02 01:50:06, xiaochu wrote: > Config is constructed as a factory class. Code is ...
3 years, 9 months ago (2017-03-02 02:14:31 UTC) #21
waffles
On 2017/03/02 02:14:31, xiaochu wrote: > On 2017/03/02 01:50:06, xiaochu wrote: > > Config is ...
3 years, 9 months ago (2017-03-02 16:27:19 UTC) #22
xiaochu
On 2017/03/02 16:27:19, waffles wrote: > On 2017/03/02 02:14:31, xiaochu wrote: > > On 2017/03/02 ...
3 years, 9 months ago (2017-03-02 16:41:23 UTC) #23
xiaochu
On 2017/03/02 16:27:19, waffles wrote: > On 2017/03/02 02:14:31, xiaochu wrote: > > On 2017/03/02 ...
3 years, 9 months ago (2017-03-02 16:43:32 UTC) #24
waffles
On 2017/03/02 16:43:32, xiaochu wrote: > On 2017/03/02 16:27:19, waffles wrote: > > On 2017/03/02 ...
3 years, 9 months ago (2017-03-02 16:54:33 UTC) #25
xiaochu
On 2017/03/02 16:54:33, waffles wrote: > On 2017/03/02 16:43:32, xiaochu wrote: > > On 2017/03/02 ...
3 years, 9 months ago (2017-03-02 17:04:49 UTC) #26
waffles
On 2017/03/02 17:04:49, xiaochu wrote: > On 2017/03/02 16:54:33, waffles wrote: > > On 2017/03/02 ...
3 years, 9 months ago (2017-03-02 17:15:41 UTC) #27
xiaochu
thanks! I temporarily disabled configuration loading while I am waiting for response from owners. I ...
3 years, 9 months ago (2017-03-02 18:26:47 UTC) #28
xiaochu
thanks! I temporarily disabled configuration loading while I am waiting for response from owners. I ...
3 years, 9 months ago (2017-03-02 18:26:50 UTC) #29
waffles
https://codereview.chromium.org/2707063002/diff/420001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/420001/chrome/browser/component_updater/cros_component_installer.cc#newcode164 chrome/browser/component_updater/cros_component_installer.cc:164: "}"; If we are going this way, just use ...
3 years, 9 months ago (2017-03-02 18:52:39 UTC) #30
xiaochu
Thanks! All done and tested. https://codereview.chromium.org/2707063002/diff/420001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/420001/chrome/browser/component_updater/cros_component_installer.cc#newcode164 chrome/browser/component_updater/cros_component_installer.cc:164: "}"; On 2017/03/02 18:52:39, ...
3 years, 9 months ago (2017-03-02 19:24:10 UTC) #31
waffles
Thanks! This is getting close, just a few minor issues left from me. https://codereview.chromium.org/2707063002/diff/440001/chrome/browser/component_updater/cros_component_installer.cc File ...
3 years, 9 months ago (2017-03-02 20:50:16 UTC) #32
xiaochu
Done. Exciting! https://codereview.chromium.org/2707063002/diff/440001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/440001/chrome/browser/component_updater/cros_component_installer.cc#newcode7 chrome/browser/component_updater/cros_component_installer.cc:7: #include "base/task_scheduler/task_traits.h" On 2017/03/02 20:50:16, waffles wrote: ...
3 years, 9 months ago (2017-03-02 21:08:34 UTC) #33
waffles
lgtm (Please wait for an lgtm from sorin, too, since Sorin often catches things I ...
3 years, 9 months ago (2017-03-02 21:33:37 UTC) #34
Sorin Jianu
Thank you! Please excuse the brevity, I just wanted to get this done before the ...
3 years, 9 months ago (2017-03-02 22:27:25 UTC) #35
xiaochu
Thanks! Done and tested on device. https://codereview.chromium.org/2707063002/diff/460001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/460001/chrome/browser/component_updater/cros_component_installer.cc#newcode11 chrome/browser/component_updater/cros_component_installer.cc:11: #if defined(OS_CHROMEOS) On ...
3 years, 9 months ago (2017-03-03 00:08:53 UTC) #36
Sorin Jianu
lgtm Thank you very much! A couple more style issues but lgtm otherwise. https://codereview.chromium.org/2707063002/diff/480001/chrome/browser/component_updater/cros_component_installer.cc File ...
3 years, 9 months ago (2017-03-03 02:19:06 UTC) #37
xiaochu
Thanks! Done. https://codereview.chromium.org/2707063002/diff/480001/chrome/browser/component_updater/cros_component_installer.cc File chrome/browser/component_updater/cros_component_installer.cc (right): https://codereview.chromium.org/2707063002/diff/480001/chrome/browser/component_updater/cros_component_installer.cc#newcode161 chrome/browser/component_updater/cros_component_installer.cc:161: } On 2017/03/03 02:19:03, Sorin Jianu wrote: ...
3 years, 9 months ago (2017-03-03 17:16:26 UTC) #38
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/2707063002/520001
3 years, 9 months ago (2017-03-03 19:33:27 UTC) #47
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 19:41:02 UTC) #50
Message was sent while issue was closed.
Committed patchset #27 (id:520001) as
https://chromium.googlesource.com/chromium/src/+/4c9aa5146e5df6682b3fa25e0505...

Powered by Google App Engine
This is Rietveld 408576698