| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/extensions/pending_extension_info.h" | 30 #include "chrome/browser/extensions/pending_extension_info.h" |
| 31 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" | 31 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
| 32 #include "chrome/browser/prefs/pref_change_registrar.h" | 32 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 33 #include "chrome/common/extensions/extension.h" | 33 #include "chrome/common/extensions/extension.h" |
| 34 #include "chrome/common/property_bag.h" | 34 #include "chrome/common/property_bag.h" |
| 35 #include "content/browser/browser_thread.h" | 35 #include "content/browser/browser_thread.h" |
| 36 #include "content/common/notification_observer.h" | 36 #include "content/common/notification_observer.h" |
| 37 #include "content/common/notification_registrar.h" | 37 #include "content/common/notification_registrar.h" |
| 38 | 38 |
| 39 class ExtensionBrowserEventRouter; | 39 class ExtensionBrowserEventRouter; |
| 40 class ExtensionPreferenceEventRouter; |
| 40 class ExtensionServiceBackend; | 41 class ExtensionServiceBackend; |
| 41 class ExtensionToolbarModel; | 42 class ExtensionToolbarModel; |
| 42 class ExtensionUpdater; | 43 class ExtensionUpdater; |
| 43 class GURL; | 44 class GURL; |
| 44 class Profile; | 45 class Profile; |
| 45 class Version; | 46 class Version; |
| 46 | 47 |
| 47 // This is an interface class to encapsulate the dependencies that | 48 // This is an interface class to encapsulate the dependencies that |
| 48 // ExtensionUpdater has on ExtensionService. This allows easy mocking. | 49 // ExtensionUpdater has on ExtensionService. This allows easy mocking. |
| 49 class ExtensionUpdateService { | 50 class ExtensionUpdateService { |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 555 |
| 555 // Manages the installation of default apps and the promotion of them in the | 556 // Manages the installation of default apps and the promotion of them in the |
| 556 // app launcher. | 557 // app launcher. |
| 557 DefaultApps default_apps_; | 558 DefaultApps default_apps_; |
| 558 | 559 |
| 559 // Flag to make sure event routers are only initialized once. | 560 // Flag to make sure event routers are only initialized once. |
| 560 bool event_routers_initialized_; | 561 bool event_routers_initialized_; |
| 561 | 562 |
| 562 scoped_ptr<ExtensionBrowserEventRouter> browser_event_router_; | 563 scoped_ptr<ExtensionBrowserEventRouter> browser_event_router_; |
| 563 | 564 |
| 565 scoped_ptr<ExtensionPreferenceEventRouter> preference_event_router_; |
| 566 |
| 564 // A collection of external extension providers. Each provider reads | 567 // A collection of external extension providers. Each provider reads |
| 565 // a source of external extension information. Examples include the | 568 // a source of external extension information. Examples include the |
| 566 // windows registry and external_extensions.json. | 569 // windows registry and external_extensions.json. |
| 567 ProviderCollection external_extension_providers_; | 570 ProviderCollection external_extension_providers_; |
| 568 | 571 |
| 569 // Set to true by OnExternalExtensionUpdateUrlFound() when an external | 572 // Set to true by OnExternalExtensionUpdateUrlFound() when an external |
| 570 // extension URL is found. Used in CheckForExternalUpdates() to see | 573 // extension URL is found. Used in CheckForExternalUpdates() to see |
| 571 // if an update check is needed to install pending extensions. | 574 // if an update check is needed to install pending extensions. |
| 572 bool external_extension_url_added_; | 575 bool external_extension_url_added_; |
| 573 | 576 |
| 574 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 577 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 575 UpdatePendingExtensionAlreadyInstalled); | 578 UpdatePendingExtensionAlreadyInstalled); |
| 576 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 579 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 577 InstallAppsWithUnlimtedStorage); | 580 InstallAppsWithUnlimtedStorage); |
| 578 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 581 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 579 InstallAppsAndCheckStorageProtection); | 582 InstallAppsAndCheckStorageProtection); |
| 580 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 583 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 581 }; | 584 }; |
| 582 | 585 |
| 583 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 586 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |