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

Issue 8654001: Reland restrict extension features based on the extension type. (Closed)

Created:
9 years, 1 month ago by jstritar
Modified:
9 years ago
CC:
chromium-reviews, Erik does not do reviews, Paweł Hajdan Jr., mihaip+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, miket_OOO, Mihai Parparita -not on Chrome
Visibility:
Public.

Description

Reland restrict extension features based on the extension type. The "chrome_url_overrides" manifest key is now accessible by packaged apps. BUG=101992, 104103 TEST=existing, ManifestTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112914

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 30

Patch Set 5 : feedback #

Patch Set 6 : . #

Total comments: 12

Patch Set 7 : feedback #

Patch Set 8 : chrome_url_overrides for packaged apps #

Patch Set 9 : . #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+866 lines, -296 lines) Patch
M chrome/browser/extensions/chrome_app_api_browsertest.cc View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/installed_loader.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 5 6 10 chunks +19 lines, -33 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 5 6 7 45 chunks +91 lines, -178 lines 0 comments Download
M chrome/common/extensions/extension_constants.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M chrome/common/extensions/extension_constants.cc View 1 2 3 4 5 6 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/common/extensions/extension_manifests_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -9 lines 0 comments Download
M chrome/common/extensions/extension_messages.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
A chrome/common/extensions/manifest.h View 1 2 3 4 5 6 1 chunk +112 lines, -0 lines 0 comments Download
A chrome/common/extensions/manifest.cc View 1 2 3 4 5 6 7 1 chunk +229 lines, -0 lines 8 comments Download
A chrome/common/extensions/manifest_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +391 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/app_bindings.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
A + chrome/test/data/extensions/manifest_tests/background_permission.json View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
D chrome/test/data/extensions/manifest_tests/disallow_hybrid_1.json View 1 2 3 4 5 6 1 chunk +0 lines, -17 lines 0 comments Download
D chrome/test/data/extensions/manifest_tests/disallow_hybrid_2.json View 1 2 3 4 5 6 1 chunk +0 lines, -17 lines 0 comments Download
A + chrome/test/data/extensions/manifest_tests/multiple_ui_surfaces.json View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
D chrome/test/data/extensions/manifest_tests/multiple_ui_surfaces_1.json View 1 2 3 4 5 6 1 chunk +0 lines, -6 lines 0 comments Download
D chrome/test/data/extensions/manifest_tests/multiple_ui_surfaces_2.json View 1 2 3 4 5 6 1 chunk +0 lines, -10 lines 0 comments Download
D chrome/test/data/extensions/manifest_tests/multiple_ui_surfaces_3.json View 1 2 3 4 5 6 1 chunk +0 lines, -11 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
jstritar
9 years, 1 month ago (2011-11-22 23:11:03 UTC) #1
Aaron Boodman
Nice! http://codereview.chromium.org/8654001/diff/5014/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8654001/diff/5014/chrome/browser/extensions/extension_prefs.cc#newcode1104 chrome/browser/extensions/extension_prefs.cc:1104: extension->manifest_value()->value()->DeepCopy()); Yeah, calling this thing just "manifest" would ...
9 years, 1 month ago (2011-11-23 01:45:25 UTC) #2
jstritar
http://codereview.chromium.org/8654001/diff/5014/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): http://codereview.chromium.org/8654001/diff/5014/chrome/browser/extensions/extension_prefs.cc#newcode1104 chrome/browser/extensions/extension_prefs.cc:1104: extension->manifest_value()->value()->DeepCopy()); On 2011/11/23 01:45:25, Aaron Boodman wrote: > Yeah, ...
9 years ago (2011-11-28 23:09:56 UTC) #3
Aaron Boodman
http://codereview.chromium.org/8654001/diff/14005/chrome/common/extensions/manifest.cc File chrome/common/extensions/manifest.cc (right): http://codereview.chromium.org/8654001/diff/14005/chrome/common/extensions/manifest.cc#newcode1 chrome/common/extensions/manifest.cc:1: // Copyright (c) 2011 The Chromium Authors. All rights ...
9 years ago (2011-12-01 21:32:04 UTC) #4
jstritar
http://codereview.chromium.org/8654001/diff/14005/chrome/common/extensions/manifest.cc File chrome/common/extensions/manifest.cc (right): http://codereview.chromium.org/8654001/diff/14005/chrome/common/extensions/manifest.cc#newcode1 chrome/common/extensions/manifest.cc:1: // Copyright (c) 2011 The Chromium Authors. All rights ...
9 years ago (2011-12-02 16:26:32 UTC) #5
Aaron Boodman
LGTM
9 years ago (2011-12-02 17:06:52 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jstritar@chromium.org/8654001/23002
9 years ago (2011-12-02 18:19:25 UTC) #7
commit-bot: I haz the power
Change committed as 112764
9 years ago (2011-12-02 19:49:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jstritar@chromium.org/8654001/30001
9 years ago (2011-12-03 15:00:39 UTC) #9
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
9 years ago (2011-12-03 16:13:51 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jstritar@chromium.org/8654001/30001
9 years ago (2011-12-03 19:58:01 UTC) #11
commit-bot: I haz the power
Change committed as 112914
9 years ago (2011-12-04 00:55:35 UTC) #12
Mihai Parparita -not on Chrome
+Mike for my drive-by platform app restriction musings. http://codereview.chromium.org/8654001/diff/30001/chrome/common/extensions/manifest.cc File chrome/common/extensions/manifest.cc (right): http://codereview.chromium.org/8654001/diff/30001/chrome/common/extensions/manifest.cc#newcode43 chrome/common/extensions/manifest.cc:43: // ...
9 years ago (2011-12-05 23:24:07 UTC) #13
jstritar
9 years ago (2011-12-14 19:00:26 UTC) #14
http://codereview.chromium.org/8654001/diff/30001/chrome/common/extensions/ma...
File chrome/common/extensions/manifest.cc (right):

http://codereview.chromium.org/8654001/diff/30001/chrome/common/extensions/ma...
chrome/common/extensions/manifest.cc:43: // keys::kPlatformApp holds a boolean,
so all types can define it.
On 2011/12/05 23:24:07, Mihai Parparita wrote:
> If this makes platform apps weird (because all the other app types are implied
> by the presence of specific manifest keys), perhaps this should be changed.

If you can think of any fields that could go under platform_app, we could make
it a dictionary like app.

http://codereview.chromium.org/8654001/diff/30001/chrome/common/extensions/ma...
chrome/common/extensions/manifest.cc:57: map[keys::kOfflineEnabled] =
all_but_themes;
On 2011/12/05 23:24:07, Mihai Parparita wrote:
> Does this make sense for extensions? I guess we weren't forbidding it before,
so
> it might be too late to restrict it now.

Not sure, I don't think it'll hurt, but yeah it wasn't forbidden before.

http://codereview.chromium.org/8654001/diff/30001/chrome/common/extensions/ma...
chrome/common/extensions/manifest.cc:60: map[keys::kConvertedFromUserScript] =
all_but_themes;
On 2011/12/05 23:24:07, Mihai Parparita wrote:
> I don't think this makes sense for apps (of any kind).

This is kind of like platform_app where it's a boolean. There are some sync unit
tests that set it to false, though I'm not sure if that happens in real life. We
might be able to do better validation (e.g. not set to true for apps) when we
switch to JSON schema.

http://codereview.chromium.org/8654001/diff/30001/chrome/common/extensions/ma...
chrome/common/extensions/manifest.cc:62: map[keys::kPlugins] = all_but_themes;
On 2011/12/05 23:24:07, Mihai Parparita wrote:
> I think we're going to try removing NPAPI plugin support from platform apps.

I'll fix this in another CL.

Powered by Google App Engine
This is Rietveld 408576698