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

Issue 4551001: Disable ExtensionPrefStore for local-state pref store (Closed)

Created:
10 years, 1 month ago by battre (please use the other)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, pam+watch_chromium.org, ben+cc_chromium.org, Paweł Hajdan Jr.
Base URL:
http://git.chromium.org/git/chromium.git/@trunk
Visibility:
Public.

Description

Disable ExtensionPrefStore for local-state pref store The local-state pref store shares preferences between all profiles on a computer. This CL prevents extensions to use the ExtensionPrefStore in the local-sate. Reasoning: The ExtensionPrefStore cannot be used for storing extension preferences in the local-state (shared among all profiles on a machine). In this context, there is no meaningful definition of a precedence order as the same extensions can be installed in different profiles. One extension instance could override the preferences of another instance. If the "winning preferences" (the ones with highest preference) are persisted and carried over between browser restarts, this could also make debugging very difficult: The browser behaves strangely even though no extensions are installed. Therefore, one needs to start the right profile in order to uninstall an extension and fix problems of in other profiles. For these reasons we (pamg, battre) decided to not support the ExtensionPrefStore for local-state. Unit tests can only verify that the DCHECKs are triggered. I have implemented one such test but do not include it in this CL because DCHECK triggers a termination. This is an extension of http://codereview.chromium.org/4438001/show Contributed by battre@google.com BUG=50726 TEST=none

Patch Set 1 #

Total comments: 24

Patch Set 2 : Addressed Review Comments #

Patch Set 3 : This time without accidentally committing the merged CL #

Total comments: 6

Patch Set 4 : Addressed Pam's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -53 lines) Patch
M chrome/browser/extensions/extension_pref_store.h View 1 2 3 chunks +6 lines, -12 lines 0 comments Download
M chrome/browser/extensions/extension_pref_store.cc View 1 2 3 6 chunks +25 lines, -41 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
battre (please use the other)
Hi. Is this the right way to disable the ExtensionPrefStore? I basically just prevent the ...
10 years, 1 month ago (2010-11-05 00:43:55 UTC) #1
Pam (message me for reviews)
http://codereview.chromium.org/4551001/diff/1/2 File chrome/browser/extensions/extension_pref_store.cc (right): http://codereview.chromium.org/4551001/diff/1/2#newcode26 chrome/browser/extensions/extension_pref_store.cc:26: // If profile_==NULL, this ExtensionPrefStore is for local-state. This ...
10 years, 1 month ago (2010-11-05 12:07:15 UTC) #2
battre (please use the other)
Addressed issues. http://codereview.chromium.org/4551001/diff/1/2 File chrome/browser/extensions/extension_pref_store.cc (right): http://codereview.chromium.org/4551001/diff/1/2#newcode26 chrome/browser/extensions/extension_pref_store.cc:26: // If profile_==NULL, this ExtensionPrefStore is for ...
10 years, 1 month ago (2010-11-05 22:05:31 UTC) #3
Pam (message me for reviews)
LGTM with minor nits below addressed. - Pam http://codereview.chromium.org/4551001/diff/15001/16001 File chrome/browser/extensions/extension_pref_store.cc (right): http://codereview.chromium.org/4551001/diff/15001/16001#newcode17 chrome/browser/extensions/extension_pref_store.cc:17: #include ...
10 years, 1 month ago (2010-11-06 16:26:22 UTC) #4
battre (please use the other)
10 years, 1 month ago (2010-11-09 14:47:41 UTC) #5
Done

http://codereview.chromium.org/4551001/diff/15001/16001
File chrome/browser/extensions/extension_pref_store.cc (right):

http://codereview.chromium.org/4551001/diff/15001/16001#newcode17
chrome/browser/extensions/extension_pref_store.cc:17: #include
"chrome/common/notification_service.h"
On 2010/11/06 16:26:22, Pam wrote:
> Is this header still needed, now that we're not using
> NotificationService::AllSources anymore?

Done. Replaced it with necessary headers.

http://codereview.chromium.org/4551001/diff/15001/16001#newcode115
chrome/browser/extensions/extension_pref_store.cc:115: // may be null in unit
tests
On 2010/11/06 16:26:22, Pam wrote:
> Please start with a capital letter and end with a period, even when the
comment
> is a sentence fragment. The first is just for visual consistency and ease of
> reading, the second to make it completely clear that you didn't accidentally
end
> the comment in the middle.

Done.

http://codereview.chromium.org/4551001/diff/15001/16001#newcode143
chrome/browser/extensions/extension_pref_store.cc:143: // may be null in unit
tests
On 2010/11/06 16:26:22, Pam wrote:
> Same here (cap and period). Also, the profile_ will be null for the
local-store
> instance of the ExtensionPrefStore, not just in unit tests.

Done.

Powered by Google App Engine
This is Rietveld 408576698