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

Issue 2150193002: [Extensions] Add a SimpleFeature::Validate function (Closed)

Created:
4 years, 5 months ago by Devlin
Modified:
4 years, 5 months ago
Reviewers:
lazyboy
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 a SimpleFeature::Validate function Currently, most feature validation happens in Parse(). Add a Validate() function that can be called after Parse() so that if a feature is generated, validation can still be performed (independent of whether or not the feature is created from a JSON value). In the future, these validations should be performed as part of the compile process, but this is a starting point. Also update tests that parsed features and used JSONFeatureProvider only to test this validation. This way, once we move away from JSON-based features and JSONFeatureProvider, these tests are still active. BUG=280286 Committed: https://crrev.com/23f765ccc6be80523d9d09358e249fc749cf5331 Cr-Commit-Position: refs/heads/master@{#406076}

Patch Set 1 #

Patch Set 2 : Tests #

Total comments: 9

Patch Set 3 : Istiaque's #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -202 lines) Patch
M chrome/common/extensions/api/common_extension_api_unittest.cc View 1 2 1 chunk +9 lines, -29 lines 0 comments Download
M extensions/common/features/api_feature.h View 1 chunk +1 line, -6 lines 0 comments Download
M extensions/common/features/api_feature.cc View 1 chunk +9 lines, -15 lines 0 comments Download
M extensions/common/features/json_feature_provider.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M extensions/common/features/manifest_feature.h View 1 chunk +1 line, -1 line 0 comments Download
M extensions/common/features/manifest_feature.cc View 1 chunk +11 lines, -9 lines 0 comments Download
M extensions/common/features/permission_feature.h View 1 chunk +1 line, -2 lines 0 comments Download
M extensions/common/features/permission_feature.cc View 1 chunk +11 lines, -9 lines 0 comments Download
M extensions/common/features/simple_feature.h View 1 2 4 chunks +11 lines, -4 lines 0 comments Download
M extensions/common/features/simple_feature.cc View 4 chunks +14 lines, -6 lines 0 comments Download
M extensions/common/features/simple_feature_unittest.cc View 1 2 3 chunks +90 lines, -118 lines 0 comments Download

Messages

Total messages: 20 (12 generated)
Devlin
Istiaque, mind taking a look?
4 years, 5 months ago (2016-07-15 22:11:28 UTC) #7
lazyboy
https://codereview.chromium.org/2150193002/diff/20001/extensions/common/features/simple_feature.cc File extensions/common/features/simple_feature.cc (right): https://codereview.chromium.org/2150193002/diff/20001/extensions/common/features/simple_feature.cc#newcode314 extensions/common/features/simple_feature.cc:314: internal_(false) {} This is exposing "internal" field to all ...
4 years, 5 months ago (2016-07-15 22:53:40 UTC) #8
Devlin
https://codereview.chromium.org/2150193002/diff/20001/extensions/common/features/simple_feature.cc File extensions/common/features/simple_feature.cc (right): https://codereview.chromium.org/2150193002/diff/20001/extensions/common/features/simple_feature.cc#newcode314 extensions/common/features/simple_feature.cc:314: internal_(false) {} On 2016/07/15 22:53:40, lazyboy wrote: > This ...
4 years, 5 months ago (2016-07-18 17:51:58 UTC) #9
lazyboy
lgtm https://codereview.chromium.org/2150193002/diff/20001/extensions/common/features/simple_feature.cc File extensions/common/features/simple_feature.cc (right): https://codereview.chromium.org/2150193002/diff/20001/extensions/common/features/simple_feature.cc#newcode314 extensions/common/features/simple_feature.cc:314: internal_(false) {} On 2016/07/18 17:51:58, Devlin wrote: > ...
4 years, 5 months ago (2016-07-18 17:57:43 UTC) #10
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/2150193002/40001
4 years, 5 months ago (2016-07-18 20:03:39 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-07-18 20:08:58 UTC) #17
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-18 20:09:09 UTC) #18
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 20:13:03 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/23f765ccc6be80523d9d09358e249fc749cf5331
Cr-Commit-Position: refs/heads/master@{#406076}

Powered by Google App Engine
This is Rietveld 408576698