| Index: extensions/browser/extension_pref_value_map.h
|
| diff --git a/extensions/browser/extension_pref_value_map.h b/extensions/browser/extension_pref_value_map.h
|
| index 48f30d99186824e009af1fb7abbae115c9ee1866..c0e48cce10c001b03b6bacb99fa22cd6561f494f 100644
|
| --- a/extensions/browser/extension_pref_value_map.h
|
| +++ b/extensions/browser/extension_pref_value_map.h
|
| @@ -95,8 +95,9 @@ class ExtensionPrefValueMap : public BrowserContextKeyedService {
|
| extensions::ExtensionPrefsScope scope);
|
|
|
| // Returns true if currently no extension with higher precedence controls the
|
| - // preference.
|
| - // Note that the this function does does not consider the existence of
|
| + // preference. If |incognito| is true and the extension does not have
|
| + // incognito permission, CanExtensionControlPref returns false.
|
| + // Note that this function does does not consider the existence of
|
| // policies. An extension is only really able to control a preference if
|
| // PrefService::Preference::IsExtensionModifiable() returns true as well.
|
| bool CanExtensionControlPref(const std::string& extension_id,
|
| @@ -119,7 +120,8 @@ class ExtensionPrefValueMap : public BrowserContextKeyedService {
|
| const std::string& pref_key,
|
| bool* from_incognito) const;
|
|
|
| - // Returns the ID of the extension that currently controls this preference.
|
| + // Returns the ID of the extension that currently controls this preference
|
| + // for a regular profile. Incognito settings are ignored.
|
| // Returns an empty string if this preference is not controlled by an
|
| // extension.
|
| std::string GetExtensionControllingPref(const std::string& pref_key) const;
|
| @@ -130,7 +132,8 @@ class ExtensionPrefValueMap : public BrowserContextKeyedService {
|
| // Registers the time when an extension |ext_id| is installed.
|
| void RegisterExtension(const std::string& ext_id,
|
| const base::Time& install_time,
|
| - bool is_enabled);
|
| + bool is_enabled,
|
| + bool is_incognito_enabled);
|
|
|
| // Deletes all entries related to extension |ext_id|.
|
| void UnregisterExtension(const std::string& ext_id);
|
| @@ -139,6 +142,10 @@ class ExtensionPrefValueMap : public BrowserContextKeyedService {
|
| // visible.
|
| void SetExtensionState(const std::string& ext_id, bool is_enabled);
|
|
|
| + // Sets whether the extension has permission to access incognito state.
|
| + void SetExtensionIncognitoState(const std::string& ext_id,
|
| + bool is_incognito_enabled);
|
| +
|
| // Adds an observer and notifies it about the currently stored keys.
|
| void AddObserver(Observer* observer);
|
|
|
|
|