| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 // Gets the next available application launch index. This is 1 higher than the | 186 // Gets the next available application launch index. This is 1 higher than the |
| 187 // highest current application launch index found. | 187 // highest current application launch index found. |
| 188 int GetNextAppLaunchIndex(); | 188 int GetNextAppLaunchIndex(); |
| 189 | 189 |
| 190 static void RegisterUserPrefs(PrefService* prefs); | 190 static void RegisterUserPrefs(PrefService* prefs); |
| 191 | 191 |
| 192 // The underlying PrefService. | 192 // The underlying PrefService. |
| 193 PrefService* pref_service() const { return prefs_; } | 193 PrefService* pref_service() const { return prefs_; } |
| 194 | 194 |
| 195 // Persists the vector of extension ids |precedence|. |
| 196 // See ExtensionPrefs::GetExtensionPrecedences for its semantics. |
| 197 // |
| 198 // Note: This function only persists the vector in the PrefStore. Precedences |
| 199 // are actually managed by ExtensionPrefStore. Therefore, only that class |
| 200 // should call PersistExtensionPrecedences. |
| 201 void PersistExtensionPrecedences(const std::vector<std::string>& precedence); |
| 202 |
| 203 // Fills the |precedence| vector with the extension ids in increasing |
| 204 // order of precedence. Higher precedence means that an extension may |
| 205 // overwrite settings of an extension with lower precedence. |
| 206 // As of now, the precedence is determined by installation order and |
| 207 // updated by OnExtensionInstalled and OnExtensionUninstalled. |
| 208 void GetExtensionPrecedences(std::vector<std::string>* precedence) const; |
| 209 |
| 195 private: | 210 private: |
| 196 // Converts absolute paths in the pref to paths relative to the | 211 // Converts absolute paths in the pref to paths relative to the |
| 197 // install_directory_. | 212 // install_directory_. |
| 198 void MakePathsRelative(); | 213 void MakePathsRelative(); |
| 199 | 214 |
| 200 // Converts internal relative paths to be absolute. Used for export to | 215 // Converts internal relative paths to be absolute. Used for export to |
| 201 // consumers who expect full paths. | 216 // consumers who expect full paths. |
| 202 void MakePathsAbsolute(DictionaryValue* dict); | 217 void MakePathsAbsolute(DictionaryValue* dict); |
| 203 | 218 |
| 204 // Sets the pref |key| for extension |id| to |value|. | 219 // Sets the pref |key| for extension |id| to |value|. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 // Base extensions install directory. | 271 // Base extensions install directory. |
| 257 FilePath install_directory_; | 272 FilePath install_directory_; |
| 258 | 273 |
| 259 // The URLs of all of the toolstrips. | 274 // The URLs of all of the toolstrips. |
| 260 URLList shelf_order_; | 275 URLList shelf_order_; |
| 261 | 276 |
| 262 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 277 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 263 }; | 278 }; |
| 264 | 279 |
| 265 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 280 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |