diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-25 14:25:33 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-25 14:25:33 +0000 |
commit | 9a8c4020cf135d7a9073cf22a69427f1259c5ed5 (patch) | |
tree | a4125b4f356d75cdea03dab1a07f3ae14e579e89 /net/base/network_config_watcher_mac.cc | |
parent | 31a3130fedb27670365b40bc8cb6dc875957531f (diff) | |
download | chromium_src-9a8c4020cf135d7a9073cf22a69427f1259c5ed5.zip chromium_src-9a8c4020cf135d7a9073cf22a69427f1259c5ed5.tar.gz chromium_src-9a8c4020cf135d7a9073cf22a69427f1259c5ed5.tar.bz2 |
Introduce incognito preference settings.
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
Diffstat (limited to 'net/base/network_config_watcher_mac.cc')
-rw-r--r-- | net/base/network_config_watcher_mac.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/base/network_config_watcher_mac.cc b/net/base/network_config_watcher_mac.cc index 5cc41b1..bd3528a 100644 --- a/net/base/network_config_watcher_mac.cc +++ b/net/base/network_config_watcher_mac.cc @@ -10,8 +10,8 @@ #include "base/compiler_specific.h" #include "base/threading/thread.h" -#include "base/mac/scoped_cftyperef.h" #include "base/threading/thread_restrictions.h" +#include "base/mac/scoped_cftyperef.h" namespace net { |