| 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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 return &delayed_installs_; | 398 return &delayed_installs_; |
| 399 } | 399 } |
| 400 | 400 |
| 401 bool show_extensions_prompts() const { return show_extensions_prompts_; } | 401 bool show_extensions_prompts() const { return show_extensions_prompts_; } |
| 402 void set_show_extensions_prompts(bool show_extensions_prompts) { | 402 void set_show_extensions_prompts(bool show_extensions_prompts) { |
| 403 show_extensions_prompts_ = show_extensions_prompts; | 403 show_extensions_prompts_ = show_extensions_prompts; |
| 404 } | 404 } |
| 405 | 405 |
| 406 Profile* profile() { return profile_; } | 406 Profile* profile() { return profile_; } |
| 407 | 407 |
| 408 void set_extension_sync_service( | |
| 409 ExtensionSyncService* extension_sync_service) { | |
| 410 extension_sync_service_ = extension_sync_service; | |
| 411 } | |
| 412 | |
| 413 // Note that this may return NULL if autoupdate is not turned on. | 408 // Note that this may return NULL if autoupdate is not turned on. |
| 414 extensions::ExtensionUpdater* updater() { return updater_.get(); } | 409 extensions::ExtensionUpdater* updater() { return updater_.get(); } |
| 415 | 410 |
| 416 extensions::ComponentLoader* component_loader() { | 411 extensions::ComponentLoader* component_loader() { |
| 417 return component_loader_.get(); | 412 return component_loader_.get(); |
| 418 } | 413 } |
| 419 | 414 |
| 420 bool browser_terminating() const { return browser_terminating_; } | 415 bool browser_terminating() const { return browser_terminating_; } |
| 421 | 416 |
| 422 extensions::SharedModuleService* shared_module_service() { | 417 extensions::SharedModuleService* shared_module_service() { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 | 607 |
| 613 // The ExtensionSystem for the profile above. | 608 // The ExtensionSystem for the profile above. |
| 614 extensions::ExtensionSystem* system_; | 609 extensions::ExtensionSystem* system_; |
| 615 | 610 |
| 616 // Preferences for the owning profile. | 611 // Preferences for the owning profile. |
| 617 extensions::ExtensionPrefs* extension_prefs_; | 612 extensions::ExtensionPrefs* extension_prefs_; |
| 618 | 613 |
| 619 // Blacklist for the owning profile. | 614 // Blacklist for the owning profile. |
| 620 extensions::Blacklist* blacklist_; | 615 extensions::Blacklist* blacklist_; |
| 621 | 616 |
| 622 // The ExtensionSyncService that is used by this ExtensionService. | |
| 623 ExtensionSyncService* extension_sync_service_; | |
| 624 | |
| 625 // Sets of enabled/disabled/terminated/blacklisted extensions. Not owned. | 617 // Sets of enabled/disabled/terminated/blacklisted extensions. Not owned. |
| 626 extensions::ExtensionRegistry* registry_; | 618 extensions::ExtensionRegistry* registry_; |
| 627 | 619 |
| 628 // Set of greylisted extensions. These extensions are disabled if they are | 620 // Set of greylisted extensions. These extensions are disabled if they are |
| 629 // already installed in Chromium at the time when they are added to | 621 // already installed in Chromium at the time when they are added to |
| 630 // the greylist. Unlike blacklisted extensions, greylisted ones are visible | 622 // the greylist. Unlike blacklisted extensions, greylisted ones are visible |
| 631 // to the user and if user re-enables such an extension, they remain enabled. | 623 // to the user and if user re-enables such an extension, they remain enabled. |
| 632 // | 624 // |
| 633 // These extensions should appear in registry_. | 625 // These extensions should appear in registry_. |
| 634 extensions::ExtensionSet greylist_; | 626 extensions::ExtensionSet greylist_; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 GreylistUnknownDontChange); | 756 GreylistUnknownDontChange); |
| 765 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 757 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 766 ManagementPolicyProhibitsEnableOnInstalled); | 758 ManagementPolicyProhibitsEnableOnInstalled); |
| 767 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 759 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 768 BlockAndUnblockBlacklistedExtension); | 760 BlockAndUnblockBlacklistedExtension); |
| 769 | 761 |
| 770 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 762 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 771 }; | 763 }; |
| 772 | 764 |
| 773 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 765 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |