New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 719770 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Pref service: support owned/unowned and public/private prefs

Project Member Reported by tibell@chromium.org, May 9 2017

Issue description

Each pref service client should be able to specify whether it owns a pref and whether it's readable by other services.

Owned/unowned: Only the owner provides the default value.
Public/private: Can other services read this pref.

These distinctions might change to be more/less fine-grained as we go along.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c998bd51c87eca0427c67a449a5686b583c9a8e

commit 7c998bd51c87eca0427c67a449a5686b583c9a8e
Author: Johan Tibell <tibell@chromium.org>
Date: Thu May 11 22:44:34 2017

Pref service: don't send default values to the service

Until we have a distinction between owned and unowned prefs sending
these around just wastes CPU cycles. This makes startup 2ms faster on a
Nexus 9.

Bug:  654988 , 719770 
Change-Id: I87e5c8da9d93226dfdf47acedf42c75f07f01a77
Reviewed-on: https://chromium-review.googlesource.com/497113
Reviewed-by: Martin Barbella <mbarbella@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Johan Tibell <tibell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#471098}
[modify] https://crrev.com/7c998bd51c87eca0427c67a449a5686b583c9a8e/services/preferences/pref_store_manager_impl.cc
[modify] https://crrev.com/7c998bd51c87eca0427c67a449a5686b583c9a8e/services/preferences/public/cpp/pref_registry_serializer.cc
[modify] https://crrev.com/7c998bd51c87eca0427c67a449a5686b583c9a8e/services/preferences/public/cpp/pref_service_factory.cc
[modify] https://crrev.com/7c998bd51c87eca0427c67a449a5686b583c9a8e/services/preferences/public/cpp/pref_service_factory.h
[modify] https://crrev.com/7c998bd51c87eca0427c67a449a5686b583c9a8e/services/preferences/public/interfaces/preferences.mojom

Project Member

Comment 2 by bugdroid1@chromium.org, May 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5c8104cd2fed3249bbd219a43176ad237d122449

commit 5c8104cd2fed3249bbd219a43176ad237d122449
Author: Sam McNally <sammc@chromium.org>
Date: Fri May 26 03:02:11 2017

Split ScopedPrefConnectionBuilder out from PrefStoreManagerImpl.

Currently, pref service connections are queued until all pref store
connections and the persistent pref store are ready. This is
unnecessarily restrictive and complicates changes necessary to support
sharing of default pref values. This CL changes the initialization of
pref connections to be more incremental.

Bug:  719770 
Change-Id: Ie94f037b3ec9262ac12c048a2f31be20e0a3291c
Reviewed-on: https://chromium-review.googlesource.com/513644
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: Johan Tibell <tibell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#474891}
[modify] https://crrev.com/5c8104cd2fed3249bbd219a43176ad237d122449/services/preferences/BUILD.gn
[modify] https://crrev.com/5c8104cd2fed3249bbd219a43176ad237d122449/services/preferences/pref_service_factory_unittest.cc
[modify] https://crrev.com/5c8104cd2fed3249bbd219a43176ad237d122449/services/preferences/pref_store_manager_impl.cc
[modify] https://crrev.com/5c8104cd2fed3249bbd219a43176ad237d122449/services/preferences/pref_store_manager_impl.h
[add] https://crrev.com/5c8104cd2fed3249bbd219a43176ad237d122449/services/preferences/scoped_pref_connection_builder.cc
[add] https://crrev.com/5c8104cd2fed3249bbd219a43176ad237d122449/services/preferences/scoped_pref_connection_builder.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/11c6c8a27ba7907142117e773d09cf6dd2b705a7

commit 11c6c8a27ba7907142117e773d09cf6dd2b705a7
Author: Sam McNally <sammc@chromium.org>
Date: Thu Jun 08 06:16:35 2017

Pref service: add support for foreign and public prefs.

This adds a distinction between private and public prefs. Private prefs
may only be accessed from a single service. Public prefs can be accessed
by any service (with access to the pref service). Public prefs are
registered with the PrefRegistry::PUBLIC flag; prefs are private by
default.

For public prefs, one service is the owner and provides the default
value and flags at registration time; these are forwarded to the pref
service where they are managed by a SharedPrefRegistry. Other services
that use the pref register using PrefRegistry::RegisterForeignPref() and
receive the default value and flags from the pref service.

Bug:  719770 
Change-Id: I9742d785ba4637589a9b74676c80da73c2a6591e
Reviewed-on: https://chromium-review.googlesource.com/513645
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Johan Tibell <tibell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477912}
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/chrome/browser/chromeos/preferences.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/chrome/browser/prefs/active_profile_pref_service.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/chrome/browser/prefs/active_profile_pref_service.h
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/components/prefs/pref_registry.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/components/prefs/pref_registry.h
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/BUILD.gn
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/pref_service_factory_unittest.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/pref_store_manager_impl.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/pref_store_manager_impl.h
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/public/cpp/persistent_pref_store_client.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/public/cpp/persistent_pref_store_client.h
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/public/cpp/pref_registry_serializer.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/public/cpp/pref_registry_serializer.h
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/public/cpp/pref_service_factory.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/public/interfaces/preferences.mojom
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/scoped_pref_connection_builder.cc
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/scoped_pref_connection_builder.h
[add] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/shared_pref_registry.cc
[add] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/shared_pref_registry.h
[add] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/unittest_helper_manifest.json
[modify] https://crrev.com/11c6c8a27ba7907142117e773d09cf6dd2b705a7/services/preferences/unittest_manifest.json

Comment 4 by sa...@chromium.org, Jun 14 2017

Status: Fixed (was: Available)

Sign in to add a comment