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

Issue 2151583003: [Extensions] Add extension feature generation code (Closed)

Created:
4 years, 5 months ago by Devlin
Modified:
4 years, 5 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Add extension feature generation code Extension features files are json files that contain information about which APIs or extension features can be used in which contexts. Currently, these files are parsed at runtime during both browser startup and renderer process startup, causing a significant delay. This patch implements the bulk of the functionality to move towards generating feature files rather than parsing them from the json, which should hopefully result in a significant speed improvement. This introduces the feature_compiler.py, which generates the .h and .cc files for a given set of features.json files, as well as the build rules to invoke it automatically and tests for it. This does not add generated files to the production build of chrome yet. Sample api_feature_provider.h and .cc: https://gist.github.com/anonymous/9bb094a90810b6050556761c87c204ac BUG=280286 Committed: https://crrev.com/88155eb86d2b8b8493eb80d09feb639d34dfdcc4 Cr-Commit-Position: refs/heads/master@{#406575}

Patch Set 1 : morepolish #

Patch Set 2 : Polish #

Patch Set 3 : Add GYP support #

Total comments: 13

Patch Set 4 : Dirk's #

Total comments: 21

Patch Set 5 : GN improvements #

Patch Set 6 : Compile Fix #

Total comments: 2

Patch Set 7 : Antony's #

Patch Set 8 : Include fix #

Patch Set 9 : Include fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1227 lines, -134 lines) Patch
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/common_extension_api_unittest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M extensions/common/features/api_feature.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M extensions/common/features/base_feature_provider_unittest.cc View 1 2 3 4 5 2 chunks +13 lines, -15 lines 0 comments Download
M extensions/common/features/complex_feature.h View 2 chunks +3 lines, -0 lines 0 comments Download
M extensions/common/features/manifest_feature.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/features/permission_feature.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/common/features/simple_feature.h View 1 2 3 4 5 6 5 chunks +56 lines, -26 lines 0 comments Download
M extensions/common/features/simple_feature.cc View 1 2 3 4 5 6 4 chunks +9 lines, -3 lines 0 comments Download
M extensions/common/features/simple_feature_unittest.cc View 1 2 3 4 5 6 21 chunks +70 lines, -79 lines 0 comments Download
A tools/json_schema_compiler/feature_compiler.py View 1 2 3 4 5 6 1 chunk +536 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/feature_compiler_test.py View 1 1 chunk +81 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/json_features.gni View 1 2 3 4 1 chunk +53 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/json_features.gypi View 1 2 3 1 chunk +63 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/test/BUILD.gn View 1 2 3 4 5 6 7 8 3 chunks +23 lines, -1 line 0 comments Download
A tools/json_schema_compiler/test/DEPS View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/features_generation_unittest.cc View 1 1 chunk +226 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/features_test.json View 1 chunk +56 lines, -0 lines 0 comments Download
A + tools/json_schema_compiler/test/features_test2.json View 1 chunk +6 lines, -1 line 0 comments Download
M tools/json_schema_compiler/test/json_schema_compiler_tests.gyp View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (34 generated)
Devlin
Antony, wanna take a look? I still need to add the gyp versions of the ...
4 years, 5 months ago (2016-07-14 00:28:45 UTC) #5
Devlin
+Dirk. Dirk, some quick context here - I'm working on moving our (extensions) feature files ...
4 years, 5 months ago (2016-07-14 22:27:21 UTC) #8
Dirk Pranke
This basically looks okay, just some stylistic stuff ... https://codereview.chromium.org/2151583003/diff/100001/build/json_features.gni File build/json_features.gni (right): https://codereview.chromium.org/2151583003/diff/100001/build/json_features.gni#newcode1 build/json_features.gni:1: ...
4 years, 5 months ago (2016-07-14 23:16:36 UTC) #9
Devlin
https://codereview.chromium.org/2151583003/diff/100001/build/json_features.gni File build/json_features.gni (right): https://codereview.chromium.org/2151583003/diff/100001/build/json_features.gni#newcode1 build/json_features.gni:1: # Copyright 2016 The Chromium Authors. All rights reserved. ...
4 years, 5 months ago (2016-07-15 16:19:07 UTC) #10
Dirk Pranke
lgtm. https://codereview.chromium.org/2151583003/diff/100001/build/json_features.gni File build/json_features.gni (right): https://codereview.chromium.org/2151583003/diff/100001/build/json_features.gni#newcode1 build/json_features.gni:1: # Copyright 2016 The Chromium Authors. All rights ...
4 years, 5 months ago (2016-07-15 19:16:37 UTC) #11
Devlin
https://codereview.chromium.org/2151583003/diff/100001/build/json_features.gni File build/json_features.gni (right): https://codereview.chromium.org/2151583003/diff/100001/build/json_features.gni#newcode47 build/json_features.gni:47: public_deps = lib_public_deps On 2016/07/15 19:16:37, Dirk Pranke wrote: ...
4 years, 5 months ago (2016-07-15 21:03:01 UTC) #12
Dirk Pranke
lgtm.
4 years, 5 months ago (2016-07-15 21:09:40 UTC) #13
asargent_no_longer_on_chrome
For features that are only allowed on some OSes, will we be able to avoid ...
4 years, 5 months ago (2016-07-19 05:33:16 UTC) #14
Devlin
On 2016/07/19 05:33:16, Antony Sargent wrote: > For features that are only allowed on some ...
4 years, 5 months ago (2016-07-19 16:23:36 UTC) #15
asargent_no_longer_on_chrome
lgtm Re: eliding code on non-supported OSes, I guess you're right that it could be ...
4 years, 5 months ago (2016-07-19 16:37:18 UTC) #18
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/2151583003/180001
4 years, 5 months ago (2016-07-19 17:08:35 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/98525)
4 years, 5 months ago (2016-07-19 17:26:22 UTC) #25
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/2151583003/180001
4 years, 5 months ago (2016-07-19 17:28:45 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/98277)
4 years, 5 months ago (2016-07-19 17:44:31 UTC) #29
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/2151583003/180001
4 years, 5 months ago (2016-07-19 19:07:12 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/98382) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 5 months ago (2016-07-19 19:20:29 UTC) #33
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/2151583003/220001
4 years, 5 months ago (2016-07-19 23:02:54 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/98889)
4 years, 5 months ago (2016-07-19 23:13:59 UTC) #39
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/2151583003/260001
4 years, 5 months ago (2016-07-20 15:09:59 UTC) #51
commit-bot: I haz the power
Committed patchset #9 (id:260001)
4 years, 5 months ago (2016-07-20 16:21:46 UTC) #53
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-20 16:21:55 UTC) #54
commit-bot: I haz the power
4 years, 5 months ago (2016-07-20 16:25:08 UTC) #56
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/88155eb86d2b8b8493eb80d09feb639d34dfdcc4
Cr-Commit-Position: refs/heads/master@{#406575}

Powered by Google App Engine
This is Rietveld 408576698