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

Issue 2856083002: Pref service: support for incognito prefs (Closed)

Created:
3 years, 7 months ago by tibell
Modified:
3 years, 7 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Pref service: support for incognito prefs Works by adding another read-only pref store type, with lower priority than the user store, that connects to the user store of the underlying profile. preferences.mojom and preferences_configuration.mojom had to be merged as they would cause a circular import otherwise. BUG=654988

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Make compile on Chrome OS #

Patch Set 4 : Fix compilation on Windows #

Total comments: 10

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -101 lines) Patch
M chrome/browser/prefs/active_profile_pref_service.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/prefs/active_profile_pref_service.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/prefs/profile_pref_store_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M components/prefs/pref_value_store.h View 2 chunks +3 lines, -0 lines 0 comments Download
M components/sync_preferences/pref_service_syncable_factory.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M services/preferences/persistent_pref_store_factory.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M services/preferences/persistent_pref_store_impl.h View 1 3 chunks +7 lines, -1 line 0 comments Download
M services/preferences/persistent_pref_store_impl.cc View 1 2 3 5 chunks +64 lines, -21 lines 0 comments Download
M services/preferences/pref_store_manager_impl.h View 1 3 chunks +15 lines, -3 lines 0 comments Download
M services/preferences/pref_store_manager_impl.cc View 1 2 3 4 8 chunks +53 lines, -7 lines 0 comments Download
M services/preferences/public/cpp/preferences_struct_traits.cc View 2 chunks +5 lines, -0 lines 0 comments Download
M services/preferences/public/cpp/tracked/configuration.h View 1 chunk +1 line, -1 line 0 comments Download
M services/preferences/public/cpp/tracked/mock_validation_delegate.h View 1 chunk +1 line, -1 line 0 comments Download
M services/preferences/public/interfaces/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M services/preferences/public/interfaces/preferences.mojom View 1 4 chunks +70 lines, -1 line 0 comments Download
D services/preferences/public/interfaces/preferences_configuration.mojom View 1 chunk +0 lines, -62 lines 0 comments Download
M services/preferences/tracked/pref_hash_filter.h View 1 chunk +1 line, -1 line 0 comments Download
M services/preferences/tracked/tracked_persistent_pref_store_factory.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 33 (21 generated)
tibell
I'm still adding a test but this is ready for a first look. The (WIP) ...
3 years, 7 months ago (2017-05-03 05:35:31 UTC) #10
tibell
Hi! This CL adds support for incognito to the new pref service. This will be ...
3 years, 7 months ago (2017-05-03 07:13:40 UTC) #18
Bernhard Bauer
On 2017/05/03 07:13:40, tibell wrote: > The pref_value_store.h change is a bit more interesting perhaps. ...
3 years, 7 months ago (2017-05-03 10:39:52 UTC) #24
tibell
On 2017/05/03 10:39:52, Bernhard Bauer wrote: > On 2017/05/03 07:13:40, tibell wrote: > > The ...
3 years, 7 months ago (2017-05-03 20:21:32 UTC) #25
Martin Barbella
mojom lgtm
3 years, 7 months ago (2017-05-04 19:48:51 UTC) #26
tibell
Dominic and Martin could you please chime in here? As I mention below this "write ...
3 years, 7 months ago (2017-05-08 00:13:09 UTC) #27
Sam McNally
https://codereview.chromium.org/2856083002/diff/60001/chrome/browser/prefs/active_profile_pref_service.cc File chrome/browser/prefs/active_profile_pref_service.cc (right): https://codereview.chromium.org/2856083002/diff/60001/chrome/browser/prefs/active_profile_pref_service.cc#newcode34 chrome/browser/prefs/active_profile_pref_service.cc:34: auto* connector = content::BrowserContext::GetConnectorFor( Add a helper for getting ...
3 years, 7 months ago (2017-05-10 01:22:16 UTC) #28
battre
Apologies, I won't be able to look into this before I/O.
3 years, 7 months ago (2017-05-10 11:03:38 UTC) #29
Bernhard Bauer
https://codereview.chromium.org/2856083002/diff/60001/services/preferences/public/interfaces/preferences.mojom File services/preferences/public/interfaces/preferences.mojom (right): https://codereview.chromium.org/2856083002/diff/60001/services/preferences/public/interfaces/preferences.mojom#newcode23 services/preferences/public/interfaces/preferences.mojom:23: INCOGNITO, On 2017/05/10 01:22:16, Sam McNally wrote: > Below ...
3 years, 7 months ago (2017-05-11 14:34:33 UTC) #30
tibell
https://codereview.chromium.org/2856083002/diff/60001/services/preferences/public/interfaces/preferences.mojom File services/preferences/public/interfaces/preferences.mojom (right): https://codereview.chromium.org/2856083002/diff/60001/services/preferences/public/interfaces/preferences.mojom#newcode23 services/preferences/public/interfaces/preferences.mojom:23: INCOGNITO, On 2017/05/11 14:34:33, Bernhard Bauer wrote: > On ...
3 years, 7 months ago (2017-05-11 22:44:43 UTC) #31
Bernhard Bauer
https://codereview.chromium.org/2856083002/diff/60001/services/preferences/public/interfaces/preferences.mojom File services/preferences/public/interfaces/preferences.mojom (right): https://codereview.chromium.org/2856083002/diff/60001/services/preferences/public/interfaces/preferences.mojom#newcode23 services/preferences/public/interfaces/preferences.mojom:23: INCOGNITO, On 2017/05/11 22:44:42, tibell wrote: > On 2017/05/11 ...
3 years, 7 months ago (2017-05-12 09:44:30 UTC) #32
tibell
3 years, 7 months ago (2017-05-25 04:03:31 UTC) #33
On 2017/05/12 09:44:30, Bernhard Bauer wrote:
>
https://codereview.chromium.org/2856083002/diff/60001/services/preferences/pu...
> File services/preferences/public/interfaces/preferences.mojom (right):
> 
>
https://codereview.chromium.org/2856083002/diff/60001/services/preferences/pu...
> services/preferences/public/interfaces/preferences.mojom:23: INCOGNITO,
> On 2017/05/11 22:44:42, tibell wrote:
> > On 2017/05/11 14:34:33, Bernhard Bauer wrote:
> > > On 2017/05/10 01:22:16, Sam McNally wrote:
> > > > Below USER.
> > > 
> > > I thought the idea was that this would be the store where pref writes end
> up,
> > > and the user store below it is only to get copy-on-write semantics?
> > > 
> > > Another way might be to just get rid of the whitelisting in the existing
> > > OverlayPrefStore (so it would essentially do the copy-on-write for all
> prefs)?
> > > 
> > > (Also, I'm sorry this is taking so long, but while I'm somewhat familiar
> with
> > > the technical workings, I really don't own the feature anymore, so I'm
> > hesistant
> > > to just give a go-ahead here.)
> > 
> > I should probably name this enum value better (UNDERLYING_USER perhaps, with
a
> > comment explaining what that means). The intention was for this enum value
to
> be
> > for the read-only view of the underlying profile's USER store and have the
> USER
> > store for the incognito profile be an in-memory read-write store.
> > 
> > Note that the current OverlayPrefStore is not a whitelist of prefs that may
be
> > written to the underlying profile but a blacklist of prefs which are only
> stored
> > in-memory. This is one reason I want to get rid of the current thing. It
makes
> > it very easy to write to the underlying profile by misstake.
> 
> Right, what I meant was: assuming that the change in behavior is desired,
could
> we just change the default behavior to what you describe?

I'm closing this in favor of https://chromium-review.googlesource.com/c/514902/
which doesn't try to change the current write-through behavior.

Powered by Google App Engine
This is Rietveld 408576698