| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 // Returns true if the user enabled this extension to be loaded in incognito | 195 // Returns true if the user enabled this extension to be loaded in incognito |
| 196 // mode. | 196 // mode. |
| 197 bool IsIncognitoEnabled(const std::string& extension_id); | 197 bool IsIncognitoEnabled(const std::string& extension_id); |
| 198 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); | 198 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); |
| 199 | 199 |
| 200 // Returns true if the user has chosen to allow this extension to inject | 200 // Returns true if the user has chosen to allow this extension to inject |
| 201 // scripts into pages with file URLs. | 201 // scripts into pages with file URLs. |
| 202 bool AllowFileAccess(const std::string& extension_id); | 202 bool AllowFileAccess(const std::string& extension_id); |
| 203 void SetAllowFileAccess(const std::string& extension_id, bool allow); | 203 void SetAllowFileAccess(const std::string& extension_id, bool allow); |
| 204 bool HasAllowFileAccessSetting(const std::string& extension_id) const; |
| 204 | 205 |
| 205 // Get the launch type preference. If no preference is set, return | 206 // Get the launch type preference. If no preference is set, return |
| 206 // |default_pref_value|. | 207 // |default_pref_value|. |
| 207 LaunchType GetLaunchType(const std::string& extension_id, | 208 LaunchType GetLaunchType(const std::string& extension_id, |
| 208 LaunchType default_pref_value); | 209 LaunchType default_pref_value); |
| 209 | 210 |
| 210 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); | 211 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); |
| 211 | 212 |
| 212 // Find the right launch container based on the launch type. | 213 // Find the right launch container based on the launch type. |
| 213 // If |extension|'s prefs do not have a launch type set, then | 214 // If |extension|'s prefs do not have a launch type set, then |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // Weak pointer, owned by Profile. | 434 // Weak pointer, owned by Profile. |
| 434 ExtensionPrefValueMap* extension_pref_value_map_; | 435 ExtensionPrefValueMap* extension_pref_value_map_; |
| 435 | 436 |
| 436 // The URLs of all of the toolstrips. | 437 // The URLs of all of the toolstrips. |
| 437 URLList shelf_order_; | 438 URLList shelf_order_; |
| 438 | 439 |
| 439 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 440 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 440 }; | 441 }; |
| 441 | 442 |
| 442 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 443 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |