Chromium Code Reviews| Index: chrome/browser/extensions/extension_prefs.h |
| diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h |
| index 803fe64efd3a878b5f89fb7dfc7fc14a4fbfe778..f5bdad4d01f1b80322aecf0f3e6c4ce7038060e9 100644 |
| --- a/chrome/browser/extensions/extension_prefs.h |
| +++ b/chrome/browser/extensions/extension_prefs.h |
| @@ -128,11 +128,10 @@ class ExtensionPrefs : public ContentSettingsStore::Observer, |
| // Returns all installed extensions |
| void GetExtensions(ExtensionIdSet* out); |
| - // Returns all installed extensions from |extension_prefs|. This is exposed |
| - // for ProtectedPrefsWatcher because it needs access to the extension ID list |
| - // before the ExtensionService is initialized. |
| - static ExtensionIdSet GetExtensionsFrom( |
| - const base::DictionaryValue* extension_prefs); |
| + // Returns all installed extensions from extension preferences provided by |
| + // |pref_service|. This is exposed for ProtectedPrefsWatcher because it needs |
| + // access to the extension ID list before the ExtensionService is initialized. |
| + static ExtensionIdSet GetExtensionsFrom(const PrefService* pref_service); |
| // Getter and setter for browser action visibility. |
| bool GetBrowserActionVisibility(const Extension* extension); |
| @@ -173,7 +172,11 @@ class ExtensionPrefs : public ContentSettingsStore::Observer, |
| void UpdateBlacklist(const std::set<std::string>& blacklist_set); |
| // Based on extension id, checks prefs to see if it is blacklisted. |
| - bool IsExtensionBlacklisted(const std::string& id); |
| + bool IsExtensionBlacklisted(const std::string& id) const; |
| + |
| + // Same as above, but can be called when no class instance is available. |
| + static bool IsExtensionBlacklisted(const std::string& extension_id, |
|
Matt Perry
2012/08/07 19:50:04
static methods should all be before non-static. yo
qfel
2012/08/13 16:03:01
Done.
Is this some kind of extension-code-specifi
|
| + const PrefService* pref_service); |
| // Based on extension id, checks prefs to see if it is orphaned. |
| bool IsExtensionOrphaned(const std::string& id); |
| @@ -488,17 +491,6 @@ class ExtensionPrefs : public ContentSettingsStore::Observer, |
| // consumers who expect full paths. |
| void MakePathsAbsolute(base::DictionaryValue* dict); |
| - // Reads a boolean pref from |ext| with key |pref_key|. |
| - // Return false if the value is false or |pref_key| does not exist. |
| - static bool ReadBooleanFromPref(const base::DictionaryValue* ext, |
| - const std::string& pref_key); |
| - |
| - // Reads an integer pref from |ext| with key |pref_key|. |
| - // Return false if the value does not exist. |
| - static bool ReadIntegerFromPref(const base::DictionaryValue* ext, |
| - const std::string& pref_key, |
| - int* out_value); |
| - |
| // Interprets the list pref, |pref_key| in |extension_id|'s preferences, as a |
| // URLPatternSet. The |valid_schemes| specify how to parse the URLPatterns. |
| bool ReadExtensionPrefURLPatternSet(const std::string& extension_id, |
| @@ -532,11 +524,6 @@ class ExtensionPrefs : public ContentSettingsStore::Observer, |
| void LoadExtensionControlledPrefs(const std::string& id, |
| ExtensionPrefsScope scope); |
| - // Checks if kPrefBlacklist is set to true in the DictionaryValue. |
| - // Return false if the value is false or kPrefBlacklist does not exist. |
| - // This is used to decide if an extension is blacklisted. |
| - static bool IsBlacklistBitSet(const base::DictionaryValue* ext); |
| - |
| // Fix missing preference entries in the extensions that are were introduced |
| // in a later Chrome version. |
| void FixMissingPrefs(const ExtensionIdSet& extension_ids); |
| @@ -553,6 +540,12 @@ class ExtensionPrefs : public ContentSettingsStore::Observer, |
| bool DoesExtensionHaveState(const std::string& id, |
| Extension::State check_state) const; |
| + // Helper function for GetInstalledExtensionInfo and |
| + // GetInstalledExtensionsInfo. |
| + ExtensionInfo* GetInstalledExtensionInfoImpl( |
| + DictionaryValue* extension_data, |
| + DictionaryValue::key_iterator extension_id) const; |
| + |
| // The pref service specific to this set of extension prefs. Owned by profile. |
| PrefService* prefs_; |