| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // mode. | 232 // mode. |
| 233 bool IsIncognitoEnabled(const std::string& extension_id); | 233 bool IsIncognitoEnabled(const std::string& extension_id); |
| 234 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); | 234 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); |
| 235 | 235 |
| 236 // Returns true if the user has chosen to allow this extension to inject | 236 // Returns true if the user has chosen to allow this extension to inject |
| 237 // scripts into pages with file URLs. | 237 // scripts into pages with file URLs. |
| 238 bool AllowFileAccess(const std::string& extension_id); | 238 bool AllowFileAccess(const std::string& extension_id); |
| 239 void SetAllowFileAccess(const std::string& extension_id, bool allow); | 239 void SetAllowFileAccess(const std::string& extension_id, bool allow); |
| 240 bool HasAllowFileAccessSetting(const std::string& extension_id) const; | 240 bool HasAllowFileAccessSetting(const std::string& extension_id) const; |
| 241 | 241 |
| 242 // Sets the extension preference indicating that an extension wants to delay |
| 243 // network requests on browser startup. |
| 244 void SetDelaysNetworkRequests(const std::string& extension_id, |
| 245 bool does_delay); |
| 246 |
| 247 // Returns true if an extension has registered to delay network requests on |
| 248 // browser startup. |
| 249 bool DelaysNetworkRequests(const std::string& extension_id); |
| 250 |
| 242 // Get the launch type preference. If no preference is set, return | 251 // Get the launch type preference. If no preference is set, return |
| 243 // |default_pref_value|. | 252 // |default_pref_value|. |
| 244 LaunchType GetLaunchType(const std::string& extension_id, | 253 LaunchType GetLaunchType(const std::string& extension_id, |
| 245 LaunchType default_pref_value); | 254 LaunchType default_pref_value); |
| 246 | 255 |
| 247 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); | 256 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); |
| 248 | 257 |
| 249 // Find the right launch container based on the launch type. | 258 // Find the right launch container based on the launch type. |
| 250 // If |extension|'s prefs do not have a launch type set, then | 259 // If |extension|'s prefs do not have a launch type set, then |
| 251 // use |default_pref_value|. | 260 // use |default_pref_value|. |
| 252 extension_misc::LaunchContainer GetLaunchContainer( | 261 extension_misc::LaunchContainer GetLaunchContainer( |
| 253 const Extension* extension, | 262 const Extension* extension, |
| 254 LaunchType default_pref_value); | 263 LaunchType default_pref_value); |
| 255 | 264 |
| 256 | |
| 257 // Saves ExtensionInfo for each installed extension with the path to the | 265 // Saves ExtensionInfo for each installed extension with the path to the |
| 258 // version directory and the location. Blacklisted extensions won't be saved | 266 // version directory and the location. Blacklisted extensions won't be saved |
| 259 // and neither will external extensions the user has explicitly uninstalled. | 267 // and neither will external extensions the user has explicitly uninstalled. |
| 260 // Caller takes ownership of returned structure. | 268 // Caller takes ownership of returned structure. |
| 261 ExtensionsInfo* GetInstalledExtensionsInfo(); | 269 ExtensionsInfo* GetInstalledExtensionsInfo(); |
| 262 | 270 |
| 263 // Returns the ExtensionInfo from the prefs for the given extension. If the | 271 // Returns the ExtensionInfo from the prefs for the given extension. If the |
| 264 // extension is not present, NULL is returned. | 272 // extension is not present, NULL is returned. |
| 265 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id); | 273 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id); |
| 266 | 274 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 527 |
| 520 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; | 528 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; |
| 521 | 529 |
| 522 // The URLs of all of the toolstrips. | 530 // The URLs of all of the toolstrips. |
| 523 URLList shelf_order_; | 531 URLList shelf_order_; |
| 524 | 532 |
| 525 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 533 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 526 }; | 534 }; |
| 527 | 535 |
| 528 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 536 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |