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