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

Issue 5642001: Fix issue that causes some extensions to be disabled right after installation. (Closed)

Created:
10 years ago by jstritar
Modified:
9 years, 6 months ago
CC:
chromium-reviews, Erik does not do reviews, ben+cc_chromium.org, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix issue that causes some extensions to be disabled right after installation. Add an option to Extension::GetDistinctHosts that strips the RCDs off the hosts. BUG=65138 TEST=ExtensionsServiceTest, ExtensionTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68446

Patch Set 1 #

Total comments: 6

Patch Set 2 : incorporate feedback #

Patch Set 3 : rename variable #

Patch Set 4 : reword a couple comments #

Total comments: 3

Patch Set 5 : fix comment #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -36 lines) Patch
M chrome/browser/extensions/extensions_service_unittest.cc View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 2 chunks +31 lines, -7 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 4 chunks +37 lines, -18 lines 1 comment Download
M chrome/common/extensions/extension_unittest.cc View 1 2 10 chunks +79 lines, -10 lines 0 comments Download
M chrome/test/data/extensions/permissions/unknown/manifest.json View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
jstritar
Erik, could you take a look at this one related to Extension::GetDistinctHosts? Thanks
10 years ago (2010-12-03 17:23:59 UTC) #1
Erik does not do reviews
Great catch. Bummer that my tests didn't catch this. Here's another idea for tackling this. ...
10 years ago (2010-12-03 17:56:42 UTC) #2
jstritar
Using GetDistinctHostsForDisplay and IsElevatedHostList worked out nicely... thanks. Uploaded a new CL that incorporates the ...
10 years ago (2010-12-03 21:52:55 UTC) #3
Erik does not do reviews
LGTM +cnygaard - FYI, the host logic had some bugs that may affect your implementation ...
10 years ago (2010-12-03 23:40:40 UTC) #4
Aaron Boodman
http://codereview.chromium.org/5642001/diff/17001/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/5642001/diff/17001/chrome/common/extensions/extension.cc#newcode362 chrome/common/extensions/extension.cc:362: candidate = "*." + candidate; Why was this change ...
10 years ago (2010-12-13 02:06:47 UTC) #5
jstritar
On 2010/12/13 02:06:47, Aaron Boodman wrote: > http://codereview.chromium.org/5642001/diff/17001/chrome/common/extensions/extension.cc > File chrome/common/extensions/extension.cc (right): > > http://codereview.chromium.org/5642001/diff/17001/chrome/common/extensions/extension.cc#newcode362 ...
10 years ago (2010-12-13 16:26:52 UTC) #6
Aaron Boodman
10 years ago (2010-12-13 17:13:17 UTC) #7
On 2010/12/13 16:26:52, jstritar1 wrote:
> On 2010/12/13 02:06:47, Aaron Boodman wrote:
> >
>
http://codereview.chromium.org/5642001/diff/17001/chrome/common/extensions/ex...
> > File chrome/common/extensions/extension.cc (right):
> > 
> >
>
http://codereview.chromium.org/5642001/diff/17001/chrome/common/extensions/ex...
> > chrome/common/extensions/extension.cc:362: candidate = "*." + candidate;
> > Why was this change necessary? It causes a manifest that contains:
> > 
> > "*.google.com",
> > "google.com"
> > 
> > ... to have two entries in the dialog. Granted, it is weird for developers
to
> do
> > that.
> 
> I did that to make the implementation more consistent with its documentation,
> and so that you could not add sub-domains without prompting the user (like
going
> from "google.com" to "*.google.com" ... or maybe we want to be able to do
> that?). I created a bug related to this, http://crbug.com/65337, but I hadn't
> thought about it affecting the install prompts.

I see. I think that maybe going from *.google.com to google.com and back should
be OK. To the user, we display both as 'access to google.com'.

> I think we should treat *.google.com and http://google.com separately for
permissions,
> but  just not display http://google.com since its contained within
*.google.com.
> Basically, we can add URLPattern::MatchesPattern and then ignore patterns that
> are subsets of other patterns.

The problem is that then we would re-prompt users even when, from their point of
view, nothing changed (they get the same warnings they got before).

> Is this something I should fix for M9?

No, I think it will be rare for developers to do this. I only noticed it because
we had a test that did it.

Powered by Google App Engine
This is Rietveld 408576698