| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 | 371 |
| 372 Profile* profile() { return profile_; } | 372 Profile* profile() { return profile_; } |
| 373 | 373 |
| 374 void set_extension_sync_service( | 374 void set_extension_sync_service( |
| 375 ExtensionSyncService* extension_sync_service) { | 375 ExtensionSyncService* extension_sync_service) { |
| 376 extension_sync_service_ = extension_sync_service; | 376 extension_sync_service_ = extension_sync_service; |
| 377 } | 377 } |
| 378 | 378 |
| 379 // Note that this may return NULL if autoupdate is not turned on. | 379 // Note that this may return NULL if autoupdate is not turned on. |
| 380 #if defined(ENABLE_EXTENSIONS) |
| 380 extensions::ExtensionUpdater* updater() { return updater_.get(); } | 381 extensions::ExtensionUpdater* updater() { return updater_.get(); } |
| 382 #else |
| 383 extensions::ExtensionUpdater* updater() { return NULL; } |
| 384 #endif |
| 381 | 385 |
| 382 extensions::ComponentLoader* component_loader() { | 386 extensions::ComponentLoader* component_loader() { |
| 383 return component_loader_.get(); | 387 return component_loader_.get(); |
| 384 } | 388 } |
| 385 | 389 |
| 386 bool browser_terminating() const { return browser_terminating_; } | 390 bool browser_terminating() const { return browser_terminating_; } |
| 387 | 391 |
| 388 extensions::SharedModuleService* shared_module_service() { | 392 extensions::SharedModuleService* shared_module_service() { |
| 389 return shared_module_service_.get(); | 393 return shared_module_service_.get(); |
| 390 } | 394 } |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 // Whether to notify users when they attempt to install an extension. | 599 // Whether to notify users when they attempt to install an extension. |
| 596 bool show_extensions_prompts_; | 600 bool show_extensions_prompts_; |
| 597 | 601 |
| 598 // Whether to delay installing of extension updates until the extension is | 602 // Whether to delay installing of extension updates until the extension is |
| 599 // idle. | 603 // idle. |
| 600 bool install_updates_when_idle_; | 604 bool install_updates_when_idle_; |
| 601 | 605 |
| 602 // Signaled when all extensions are loaded. | 606 // Signaled when all extensions are loaded. |
| 603 extensions::OneShotEvent* const ready_; | 607 extensions::OneShotEvent* const ready_; |
| 604 | 608 |
| 609 #if defined(ENABLE_EXTENSIONS) |
| 605 // Our extension updater, if updates are turned on. | 610 // Our extension updater, if updates are turned on. |
| 606 scoped_ptr<extensions::ExtensionUpdater> updater_; | 611 scoped_ptr<extensions::ExtensionUpdater> updater_; |
| 612 #endif |
| 607 | 613 |
| 608 // Map unloaded extensions' ids to their paths. When a temporarily loaded | 614 // Map unloaded extensions' ids to their paths. When a temporarily loaded |
| 609 // extension is unloaded, we lose the information about it and don't have | 615 // extension is unloaded, we lose the information about it and don't have |
| 610 // any in the extension preferences file. | 616 // any in the extension preferences file. |
| 611 typedef std::map<std::string, base::FilePath> UnloadedExtensionPathMap; | 617 typedef std::map<std::string, base::FilePath> UnloadedExtensionPathMap; |
| 612 UnloadedExtensionPathMap unloaded_extension_paths_; | 618 UnloadedExtensionPathMap unloaded_extension_paths_; |
| 613 | 619 |
| 614 // Map of DevToolsAgentHost instances that are detached, | 620 // Map of DevToolsAgentHost instances that are detached, |
| 615 // waiting for an extension to be reloaded. | 621 // waiting for an extension to be reloaded. |
| 616 typedef std::map<std::string, scoped_refptr<content::DevToolsAgentHost> > | 622 typedef std::map<std::string, scoped_refptr<content::DevToolsAgentHost> > |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 GreylistedExtensionDisabled); | 709 GreylistedExtensionDisabled); |
| 704 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 710 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 705 GreylistDontEnableManuallyDisabled); | 711 GreylistDontEnableManuallyDisabled); |
| 706 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 712 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 707 GreylistUnknownDontChange); | 713 GreylistUnknownDontChange); |
| 708 | 714 |
| 709 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 715 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 710 }; | 716 }; |
| 711 | 717 |
| 712 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 718 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |