OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // Called to change the extension's state when it is enabled/disabled. | 49 // Called to change the extension's state when it is enabled/disabled. |
50 void SetExtensionState(Extension* extension, Extension::State); | 50 void SetExtensionState(Extension* extension, Extension::State); |
51 | 51 |
52 // Returns the version string for the currently installed extension, or | 52 // Returns the version string for the currently installed extension, or |
53 // the empty string if not found. | 53 // the empty string if not found. |
54 std::string GetVersionString(const std::string& extension_id); | 54 std::string GetVersionString(const std::string& extension_id); |
55 | 55 |
56 // Ensure old extensions have fully up-to-date prefs values. | 56 // Ensure old extensions have fully up-to-date prefs values. |
57 void MigrateToPrefs(Extension* extension); | 57 void MigrateToPrefs(Extension* extension); |
58 | 58 |
| 59 // Returns extension path based on extension ID, or empty FilePath on error. |
| 60 FilePath GetExtensionPath(const std::string& extension_id); |
| 61 |
59 // Returns base extensions install directory. | 62 // Returns base extensions install directory. |
60 const FilePath& install_directory() const { return install_directory_; } | 63 const FilePath& install_directory() const { return install_directory_; } |
61 | 64 |
62 // Updates the prefs based on the blacklist. | 65 // Updates the prefs based on the blacklist. |
63 void UpdateBlacklist(const std::set<std::string>& blacklist_set); | 66 void UpdateBlacklist(const std::set<std::string>& blacklist_set); |
64 | 67 |
65 // Based on extension id, checks prefs to see if it is blacklisted. | 68 // Based on extension id, checks prefs to see if it is blacklisted. |
66 bool IsExtensionBlacklisted(const std::string& id); | 69 bool IsExtensionBlacklisted(const std::string& id); |
67 | 70 |
68 private: | 71 private: |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 private: | 129 private: |
127 // A copy of the extensions pref dictionary so that this can be passed | 130 // A copy of the extensions pref dictionary so that this can be passed |
128 // around without a dependency on prefs. | 131 // around without a dependency on prefs. |
129 scoped_ptr<DictionaryValue> extension_data_; | 132 scoped_ptr<DictionaryValue> extension_data_; |
130 | 133 |
131 DISALLOW_COPY_AND_ASSIGN(InstalledExtensions); | 134 DISALLOW_COPY_AND_ASSIGN(InstalledExtensions); |
132 }; | 135 }; |
133 | 136 |
134 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 137 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
135 | 138 |
OLD | NEW |