| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 // Used for verification of installed extension ids. For the Set method, pass | 551 // Used for verification of installed extension ids. For the Set method, pass |
| 552 // null to remove the preference. | 552 // null to remove the preference. |
| 553 const base::DictionaryValue* GetInstallSignature(); | 553 const base::DictionaryValue* GetInstallSignature(); |
| 554 void SetInstallSignature(const base::DictionaryValue* signature); | 554 void SetInstallSignature(const base::DictionaryValue* signature); |
| 555 | 555 |
| 556 // The installation parameter associated with the extension. | 556 // The installation parameter associated with the extension. |
| 557 std::string GetInstallParam(const std::string& extension_id) const; | 557 std::string GetInstallParam(const std::string& extension_id) const; |
| 558 void SetInstallParam(const std::string& extension_id, | 558 void SetInstallParam(const std::string& extension_id, |
| 559 const std::string& install_parameter); | 559 const std::string& install_parameter); |
| 560 | 560 |
| 561 // Gets/sets the next threshold for displaying a notification if an extension | |
| 562 // or app consumes excessive disk space. Returns 0 if the initial threshold | |
| 563 // has not yet been reached. | |
| 564 int64 GetNextStorageThreshold(const std::string& extension_id) const; | |
| 565 void SetNextStorageThreshold(const std::string& extension_id, | |
| 566 int64 next_threshold); | |
| 567 | |
| 568 // Gets/sets whether notifications should be shown if an extension or app | |
| 569 // consumes too much disk space. | |
| 570 bool IsStorageNotificationEnabled(const std::string& extension_id) const; | |
| 571 void SetStorageNotificationEnabled(const std::string& extension_id, | |
| 572 bool enable_notifications); | |
| 573 | |
| 574 private: | 561 private: |
| 575 friend class ExtensionPrefsBlacklistedExtensions; // Unit test. | 562 friend class ExtensionPrefsBlacklistedExtensions; // Unit test. |
| 576 friend class ExtensionPrefsUninstallExtension; // Unit test. | 563 friend class ExtensionPrefsUninstallExtension; // Unit test. |
| 577 | 564 |
| 578 enum DisableReasonChange { | 565 enum DisableReasonChange { |
| 579 DISABLE_REASON_ADD, | 566 DISABLE_REASON_ADD, |
| 580 DISABLE_REASON_REMOVE, | 567 DISABLE_REASON_REMOVE, |
| 581 DISABLE_REASON_CLEAR | 568 DISABLE_REASON_CLEAR |
| 582 }; | 569 }; |
| 583 | 570 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 bool extensions_disabled_; | 708 bool extensions_disabled_; |
| 722 | 709 |
| 723 ObserverList<ExtensionPrefsObserver> observer_list_; | 710 ObserverList<ExtensionPrefsObserver> observer_list_; |
| 724 | 711 |
| 725 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 712 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 726 }; | 713 }; |
| 727 | 714 |
| 728 } // namespace extensions | 715 } // namespace extensions |
| 729 | 716 |
| 730 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 717 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| OLD | NEW |