summaryrefslogtreecommitdiffstats
path: root/chrome/common/pref_store.h
Commit message (Collapse)AuthorAgeFilesLines
* Fixed regression: various preferences were not persisted when changed from ↵battre@chromium.org2011-07-141-3/+3
| | | | | | | | | | | | | incognito window This CL renames the OverlayPrefStore to an IncognitoPrefStore. This IncognitoPrefStore stores write operations in memory and prevents persisting them to the user prefs file. The CL also blacklists two preferences from being stored in the in-memory IncognitoPrefStore to fix the regressions mentioned in the bugs. BUG=87191,84472 TEST=see bug descriptions Review URL: http://codereview.chromium.org/7342043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92581 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/values.h into the base namespace. This includes a cros DEPS rolldmazzoni@chromium.org2011-07-121-1/+3
| | | | | | | | | | with a minor change to that code since libcros also uses base/values.h. BUG=88666 TEST=none Review URL: http://codereview.chromium.org/7259019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92208 0039d316-1c4b-4281-b951-d872f2087c98
* Adds async interface method, which is used by JsonPrefStore. Also see the ↵altimofeev@chromium.org2011-05-111-1/+1
| | | | | | | | | | | bug description for more info. BUG=chromium-os:14289 TEST=JsonPrefStoreTest.* Review URL: http://codereview.chromium.org/6894020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84962 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Let PrefStore::GetValue return a const Value* instead of Value* and add ↵battre@chromium.org2011-03-251-1/+2
| | | | | | | | | | | PersistentPrefStore::GetMutableValue BUG=none TEST=none Review URL: http://codereview.chromium.org/6713099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79413 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce incognito preference settings.battre@chromium.org2011-01-251-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL introduces preference settings for incognito windows. The semantics are the following: - An extension can set regular preferences as before. These affect regular and incognito windows. - An extension can set regular preferences *and* incognito preferences. In this case, the incognito preferences affect only incognito windows. - If extension A sets reg+incognito, extension B sets reg but no incognito, extension B has higher precedence than A --> B's preferences hold for all regular and incognito windows. - Incognito preferences are never persisted to disk. In order to realize this, the ExtensionPrefs class allows setting regular and incognito extension controlled preferences. It allows creating an incognito version of the PrefService with an independent PrefValueStore. This (incognito) PrefValueStore and the original PrefValueStore share several of their PrefStores (i.e. DefaultPrefStore, CommandLinePrefStore, Configuration PrefStores) but differ in two pref stores: - We maintain two separate ExtensionPrefStores containing the effective preferences for regular and incognito windows. - We maintain two separate user pref stores. The regular JsonPrefStore is expanded by an OverlayPersistentPrefStore that maintains all write-operations in an in-memory overlay. Therefore, incognito changes are not visible in the file-backed JsonPrefStore. The two ExtensionPrefStores retrieve their effective values from a shared ExtensionPrefValueMap. The OffTheRecordProfileImpl provides a request_context_ that uses the new PrefService already. BUG=66027,69057 TEST=unit tests, will be fully testable once the Proxy Settings API allows incognito settings. Review URL: http://codereview.chromium.org/5915004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72489 0039d316-1c4b-4281-b951-d872f2087c98
* Keep deinlining stuff.erg@google.com2010-12-151-1/+1
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5783004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69273 0039d316-1c4b-4281-b951-d872f2087c98
* Sanitize PrefStore interface.mnissler@chromium.org2010-12-091-49/+17
| | | | | | | | | | | | | | | | | This reworks the PrefStore interface, specifically: - Split up the interface into PrefStore, which only provides reading functionality, and the derived PersistentPrefStore for the actual user pref store - Remove the hurt-me-plenty prefs() function from PrefStore, instead provide Get/Set/Remove operations - Remove special handling of default and user pref store from PrefValueStore and put it into PrefService - Pref change notification handling now almost exclusively handled through PrefValueStore - Adjust all consumers of these interfaces (but keep ConfigurationPolicyPrefStore untouched, that's up next on the list) BUG=64232 TEST=existing unit tests Review URL: http://codereview.chromium.org/5646003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68736 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up pref change notification handling.mnissler@chromium.org2010-12-081-5/+33
| | | | | | | | | | | | | | | This is a complete overhaul of PrefValueStore, PrefStore, PrefNotifier, and PrefService. Specifically: - Add an observer interface to PrefStore that can be used to notify the upper layers of the pref system about value changes. Currently, it's unused mostly, but that'll change when we refactor ExtensionPrefStore and ConfigurationPolicyPrefStore. - Make PrefNotifier be a dependency of PrefValueStore. That helps in keeping the pref change detection handling local to PrefValueStore. - Clean up related unit tests, removing redundant mocks and gmockify others. BUG=64893 TEST=Compiles and passes tests Review URL: http://codereview.chromium.org/5441002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68574 0039d316-1c4b-4281-b951-d872f2087c98
* C++ readability review for dannodanno@chromium.org2010-11-031-1/+1
| | | | | | | | | | | | | | | I wrote much of the cross-platform policy-providing mechanism for Chrome. Much of the policy code is cross platform, so I would like to apply for a Linux C++ readability review. However, my submitted CLs also contain Windows-specific code, so I'm unsure if Windows readability is more appropriate. * Implementation of managed policy abstraction on top of a preference store. This is the CL that is the initial preparation for implementing platform-specific policy - http://codereview.chromium.org/1692011 * Implement core mechanism to honor Windows Group Policy on top of initial CL - http://codereview.chromium.org/2119005 * Dynamic refresh of policy without restarting Chrome including Windows-specific code - http://codereview.chromium.org/2858060 BUG=none TEST=none Review URL: http://codereview.chromium.org/3774003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64897 0039d316-1c4b-4281-b951-d872f2087c98
* When a proxy command line switches are specified, policy admin warning ↵danno@chromium.org2010-10-151-0/+17
| | | | | | | | | | | | | shouldn't be shown Removed the logic from the ConfigurationPolicyPrefStore that sets managed preferences, it's now completely handled by CommandLinePrefStore. Moved the detection of conflicting proxy settings between the managed and other stores into the PrefValueStore. Implemented a sentinel value that can be used by stores to signal that they are returning the default value. Changed managed store to use this sentinel to hide non-managed proxy settings proxy settings when proxy policy is specified. BUG=54792 TEST=manual Review URL: http://codereview.chromium.org/3367021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62716 0039d316-1c4b-4281-b951-d872f2087c98
* Gracefully handle the case of empty preference file names in PrefValueStore.mnissler@chromium.org2010-09-031-2/+2
| | | | | | | | | BUG=53917 TEST=Instead of crashing, chrome should display a message if it cannot determine the local state file. Review URL: http://codereview.chromium.org/3322005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58471 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Removed dependency on ChromeThread from JsonPrefStore and moved ↵sanjeevr@chromium.org2010-05-211-0/+49
JsonPrefStore and PrefStore to chrome/common. This is because JsonPrefStore is needed in the service process BUG=None. TEST=Updated unit-tests Review URL: http://codereview.chromium.org/2066015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47915 0039d316-1c4b-4281-b951-d872f2087c98