| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 // Set/Get whether or not the app is active. Used to force a launch of apps | 363 // Set/Get whether or not the app is active. Used to force a launch of apps |
| 364 // that don't handle onRestarted() on a restart. We can only safely do that if | 364 // that don't handle onRestarted() on a restart. We can only safely do that if |
| 365 // the app was active when it was last running. | 365 // the app was active when it was last running. |
| 366 void SetIsActive(const std::string& extension_id, bool is_active); | 366 void SetIsActive(const std::string& extension_id, bool is_active); |
| 367 bool IsActive(const std::string& extension_id); | 367 bool IsActive(const std::string& extension_id); |
| 368 | 368 |
| 369 // Returns true if the user enabled this extension to be loaded in incognito | 369 // Returns true if the user enabled this extension to be loaded in incognito |
| 370 // mode. | 370 // mode. |
| 371 // | 371 // |
| 372 // IMPORTANT: you probably want to use ExtensionService::IsIncognitoEnabled | 372 // IMPORTANT: you probably want to use extension_utils::IsIncognitoEnabled |
| 373 // instead of this method. | 373 // instead of this method. |
| 374 bool IsIncognitoEnabled(const std::string& extension_id); | 374 bool IsIncognitoEnabled(const std::string& extension_id) const; |
| 375 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); | 375 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); |
| 376 | 376 |
| 377 // Returns true if the user has chosen to allow this extension to inject | 377 // Returns true if the user has chosen to allow this extension to inject |
| 378 // scripts into pages with file URLs. | 378 // scripts into pages with file URLs. |
| 379 bool AllowFileAccess(const std::string& extension_id); | 379 // |
| 380 // IMPORTANT: you probably want to use extension_utils::AllowFileAccess |
| 381 // instead of this method. |
| 382 bool AllowFileAccess(const std::string& extension_id) const; |
| 380 void SetAllowFileAccess(const std::string& extension_id, bool allow); | 383 void SetAllowFileAccess(const std::string& extension_id, bool allow); |
| 381 bool HasAllowFileAccessSetting(const std::string& extension_id) const; | 384 bool HasAllowFileAccessSetting(const std::string& extension_id) const; |
| 382 | 385 |
| 383 // Get the launch type preference. If no preference is set, return | 386 // Get the launch type preference. If no preference is set, return |
| 384 // |default_pref_value|. | 387 // |default_pref_value|. |
| 385 LaunchType GetLaunchType(const Extension* extension, | 388 LaunchType GetLaunchType(const Extension* extension, |
| 386 LaunchType default_pref_value); | 389 LaunchType default_pref_value); |
| 387 | 390 |
| 388 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); | 391 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); |
| 389 | 392 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 scoped_ptr<TimeProvider> time_provider_; | 635 scoped_ptr<TimeProvider> time_provider_; |
| 633 | 636 |
| 634 bool extensions_disabled_; | 637 bool extensions_disabled_; |
| 635 | 638 |
| 636 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 639 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 637 }; | 640 }; |
| 638 | 641 |
| 639 } // namespace extensions | 642 } // namespace extensions |
| 640 | 643 |
| 641 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 644 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |