| Index: chrome/browser/extensions/extension_prefs.h
|
| diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
|
| index 0bcd9f90b05be13a78bd1c8191c18f8fe53f4f60..67669a31746ea436d992580f0c6ddfc1ea84f49c 100644
|
| --- a/chrome/browser/extensions/extension_prefs.h
|
| +++ b/chrome/browser/extensions/extension_prefs.h
|
| @@ -123,6 +123,19 @@ class ExtensionPrefs {
|
| // the client's.
|
| void SetLastPingDay(const std::string& extension_id, const base::Time& time);
|
|
|
| + // Gets the |api_permissions| and |host_extent| granted to the extension
|
| + // with |extension_id|. Returns false if the granted permissions preferences
|
| + // have not been initialized yet.
|
| + bool GetGrantedPermissions(const std::string& extension_id,
|
| + std::set<std::string>* api_permissions,
|
| + ExtensionExtent* host_extent);
|
| +
|
| + // Adds the specified |api_permissions| and |host_extent| to the granted
|
| + // permissions for extension with |extension_id|.
|
| + void AddGrantedPermissions(const std::string& extension_id,
|
| + const std::set<std::string>& api_permissions,
|
| + const ExtensionExtent& host_extent);
|
| +
|
| // Similar to the 2 above, but for the extensions blacklist.
|
| base::Time BlacklistLastPingDay() const;
|
| void SetBlacklistLastPingDay(const base::Time& time);
|
| @@ -222,7 +235,7 @@ class ExtensionPrefs {
|
| void DeleteExtensionPrefs(const std::string& id);
|
|
|
| // Reads a boolean pref from |ext| with key |pref_key|.
|
| - // Return false if the value is false or kPrefBlacklist does not exist.
|
| + // Return false if the value is false or |pref_key| does not exist.
|
| bool ReadBooleanFromPref(DictionaryValue* ext, const std::string& pref_key);
|
|
|
| // Reads a boolean pref |pref_key| from extension with id |extension_id|.
|
| @@ -239,6 +252,24 @@ class ExtensionPrefs {
|
| const std::string& pref_key,
|
| int* out_value);
|
|
|
| + // Reads a list pref |pref_key| from extension with id | extension_id|.
|
| + bool ReadExtensionPrefList(const std::string& extension_id,
|
| + const std::string& pref_key,
|
| + ListValue** out_value);
|
| +
|
| + // Reads a list pref |pref_key| as a string set from the extension with
|
| + // id |extension_id|.
|
| + bool ReadExtensionPrefStringSet(const std::string& extension_id,
|
| + const std::string& pref_key,
|
| + std::set<std::string>* result);
|
| +
|
| + // Adds the |added_values| to the value of |pref_key| for the extension
|
| + // with id |extension_id| (the new value will be the union of the existing
|
| + // value and |added_values|).
|
| + void AddToExtensionPrefStringSet(const std::string& extension_id,
|
| + const std::string& pref_key,
|
| + const std::set<std::string>& added_values);
|
| +
|
| // Ensures and returns a mutable dictionary for extension |id|'s prefs.
|
| DictionaryValue* GetOrCreateExtensionPref(const std::string& id);
|
|
|
|
|