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