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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 // The installation parameter associated with the extension. | 524 // The installation parameter associated with the extension. |
525 std::string GetInstallParam(const std::string& extension_id) const; | 525 std::string GetInstallParam(const std::string& extension_id) const; |
526 void SetInstallParam(const std::string& extension_id, | 526 void SetInstallParam(const std::string& extension_id, |
527 const std::string& install_parameter); | 527 const std::string& install_parameter); |
528 | 528 |
529 // The total number of times we've disabled an extension due to corrupted | 529 // The total number of times we've disabled an extension due to corrupted |
530 // contents. | 530 // contents. |
531 int GetCorruptedDisableCount() const; | 531 int GetCorruptedDisableCount() const; |
532 void IncrementCorruptedDisableCount(); | 532 void IncrementCorruptedDisableCount(); |
533 | 533 |
| 534 // Whether the extension with the given |id| needs to be synced. This is set |
| 535 // when the state (such as enabled/disabled or allowed in incognito) is |
| 536 // changed before Sync is ready. |
| 537 bool NeedsSync(const std::string& extension_id) const; |
| 538 void SetNeedsSync(const std::string& extension_id, bool needs_sync); |
| 539 |
534 private: | 540 private: |
535 friend class ExtensionPrefsBlacklistedExtensions; // Unit test. | 541 friend class ExtensionPrefsBlacklistedExtensions; // Unit test. |
536 friend class ExtensionPrefsComponentExtension; // Unit test. | 542 friend class ExtensionPrefsComponentExtension; // Unit test. |
537 friend class ExtensionPrefsUninstallExtension; // Unit test. | 543 friend class ExtensionPrefsUninstallExtension; // Unit test. |
538 | 544 |
539 enum DisableReasonChange { | 545 enum DisableReasonChange { |
540 DISABLE_REASON_ADD, | 546 DISABLE_REASON_ADD, |
541 DISABLE_REASON_REMOVE, | 547 DISABLE_REASON_REMOVE, |
542 DISABLE_REASON_CLEAR | 548 DISABLE_REASON_CLEAR |
543 }; | 549 }; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 bool extensions_disabled_; | 689 bool extensions_disabled_; |
684 | 690 |
685 base::ObserverList<ExtensionPrefsObserver> observer_list_; | 691 base::ObserverList<ExtensionPrefsObserver> observer_list_; |
686 | 692 |
687 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 693 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
688 }; | 694 }; |
689 | 695 |
690 } // namespace extensions | 696 } // namespace extensions |
691 | 697 |
692 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 698 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
OLD | NEW |