| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Converts absolute paths in the pref to paths relative to the | 73 // Converts absolute paths in the pref to paths relative to the |
| 74 // install_directory_. | 74 // install_directory_. |
| 75 void MakePathsRelative(); | 75 void MakePathsRelative(); |
| 76 | 76 |
| 77 // Converts internal relative paths to be absolute. Used for export to | 77 // Converts internal relative paths to be absolute. Used for export to |
| 78 // consumers who expect full paths. | 78 // consumers who expect full paths. |
| 79 void MakePathsAbsolute(DictionaryValue* dict); | 79 void MakePathsAbsolute(DictionaryValue* dict); |
| 80 | 80 |
| 81 // Sets the pref |key| for extension |id| to |value|. | 81 // Sets the pref |key| for extension |id| to |value|. |
| 82 bool UpdateExtensionPref(const std::string& id, | 82 void UpdateExtensionPref(const std::string& id, |
| 83 const std::wstring& key, | 83 const std::wstring& key, |
| 84 Value* value); | 84 Value* value); |
| 85 | 85 |
| 86 // Deletes the pref dictionary for extension |id|. | 86 // Deletes the pref dictionary for extension |id|. |
| 87 void DeleteExtensionPrefs(const std::string& id); | 87 void DeleteExtensionPrefs(const std::string& id); |
| 88 | 88 |
| 89 // Ensures and returns a mutable dictionary for extension |id|'s prefs. | 89 // Ensures and returns a mutable dictionary for extension |id|'s prefs. |
| 90 DictionaryValue* GetOrCreateExtensionPref(const std::string& id); | 90 DictionaryValue* GetOrCreateExtensionPref(const std::string& id); |
| 91 | 91 |
| 92 // Same as above, but returns NULL if it doesn't exist. | 92 // Same as above, but returns NULL if it doesn't exist. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 private: | 129 private: |
| 130 // 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 |
| 131 // around without a dependency on prefs. | 131 // around without a dependency on prefs. |
| 132 scoped_ptr<DictionaryValue> extension_data_; | 132 scoped_ptr<DictionaryValue> extension_data_; |
| 133 | 133 |
| 134 DISALLOW_COPY_AND_ASSIGN(InstalledExtensions); | 134 DISALLOW_COPY_AND_ASSIGN(InstalledExtensions); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 137 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 138 | 138 |
| OLD | NEW |