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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Attempts to uninstall an extension from a given ExtensionService. Returns | 191 // Attempts to uninstall an extension from a given ExtensionService. Returns |
192 // true iff the target extension exists. | 192 // true iff the target extension exists. |
193 static bool UninstallExtensionHelper(ExtensionService* extensions_service, | 193 static bool UninstallExtensionHelper(ExtensionService* extensions_service, |
194 const std::string& extension_id); | 194 const std::string& extension_id); |
195 | 195 |
196 // Constructor stores pointers to |profile| and |extension_prefs| but | 196 // Constructor stores pointers to |profile| and |extension_prefs| but |
197 // ownership remains at caller. | 197 // ownership remains at caller. |
198 ExtensionService(Profile* profile, | 198 ExtensionService(Profile* profile, |
199 const CommandLine* command_line, | 199 const CommandLine* command_line, |
200 const FilePath& install_directory, | 200 const FilePath& install_directory, |
201 ExtensionPrefs* extension_prefs, | 201 extensions::ExtensionPrefs* extension_prefs, |
202 bool autoupdate_enabled, | 202 bool autoupdate_enabled, |
203 bool extensions_enabled); | 203 bool extensions_enabled); |
204 | 204 |
205 virtual ~ExtensionService(); | 205 virtual ~ExtensionService(); |
206 | 206 |
207 // Gets the list of currently installed extensions. | 207 // Gets the list of currently installed extensions. |
208 virtual const ExtensionSet* extensions() const OVERRIDE; | 208 virtual const ExtensionSet* extensions() const OVERRIDE; |
209 virtual const ExtensionSet* disabled_extensions() const OVERRIDE; | 209 virtual const ExtensionSet* disabled_extensions() const OVERRIDE; |
210 const ExtensionSet* terminated_extensions() const; | 210 const ExtensionSet* terminated_extensions() const; |
211 | 211 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 } | 466 } |
467 | 467 |
468 bool show_extensions_prompts() { | 468 bool show_extensions_prompts() { |
469 return show_extensions_prompts_; | 469 return show_extensions_prompts_; |
470 } | 470 } |
471 | 471 |
472 Profile* profile(); | 472 Profile* profile(); |
473 | 473 |
474 // TODO(skerner): Change to const ExtensionPrefs& extension_prefs() const, | 474 // TODO(skerner): Change to const ExtensionPrefs& extension_prefs() const, |
475 // ExtensionPrefs* mutable_extension_prefs(). | 475 // ExtensionPrefs* mutable_extension_prefs(). |
476 ExtensionPrefs* extension_prefs(); | 476 extensions::ExtensionPrefs* extension_prefs(); |
477 | 477 |
478 extensions::SettingsFrontend* settings_frontend(); | 478 extensions::SettingsFrontend* settings_frontend(); |
479 | 479 |
480 extensions::ContentSettingsStore* GetContentSettingsStore(); | 480 extensions::ContentSettingsStore* GetContentSettingsStore(); |
481 | 481 |
482 // Whether the extension service is ready. | 482 // Whether the extension service is ready. |
483 virtual bool is_ready() OVERRIDE; | 483 virtual bool is_ready() OVERRIDE; |
484 | 484 |
485 extensions::ComponentLoader* component_loader() { | 485 extensions::ComponentLoader* component_loader() { |
486 return component_loader_.get(); | 486 return component_loader_.get(); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 | 705 |
706 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); | 706 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); |
707 | 707 |
708 // The normal profile associated with this ExtensionService. | 708 // The normal profile associated with this ExtensionService. |
709 Profile* profile_; | 709 Profile* profile_; |
710 | 710 |
711 // The ExtensionSystem for the profile above. | 711 // The ExtensionSystem for the profile above. |
712 ExtensionSystem* system_; | 712 ExtensionSystem* system_; |
713 | 713 |
714 // Preferences for the owning profile (weak reference). | 714 // Preferences for the owning profile (weak reference). |
715 ExtensionPrefs* extension_prefs_; | 715 extensions::ExtensionPrefs* extension_prefs_; |
716 | 716 |
717 // Settings for the owning profile. | 717 // Settings for the owning profile. |
718 scoped_ptr<extensions::SettingsFrontend> settings_frontend_; | 718 scoped_ptr<extensions::SettingsFrontend> settings_frontend_; |
719 | 719 |
720 // The current list of installed extensions. | 720 // The current list of installed extensions. |
721 ExtensionSet extensions_; | 721 ExtensionSet extensions_; |
722 | 722 |
723 // The list of installed extensions that have been disabled. | 723 // The list of installed extensions that have been disabled. |
724 ExtensionSet disabled_extensions_; | 724 ExtensionSet disabled_extensions_; |
725 | 725 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 scoped_ptr<ExtensionGlobalError> extension_global_error_; | 852 scoped_ptr<ExtensionGlobalError> extension_global_error_; |
853 | 853 |
854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
855 InstallAppsWithUnlimtedStorage); | 855 InstallAppsWithUnlimtedStorage); |
856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
857 InstallAppsAndCheckStorageProtection); | 857 InstallAppsAndCheckStorageProtection); |
858 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 858 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
859 }; | 859 }; |
860 | 860 |
861 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 861 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |