Chromium Code Reviews| 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 27 matching lines...) Expand all Loading... | |
| 38 #include "chrome/browser/sync/api/sync_change.h" | 38 #include "chrome/browser/sync/api/sync_change.h" |
| 39 #include "chrome/browser/sync/api/syncable_service.h" | 39 #include "chrome/browser/sync/api/syncable_service.h" |
| 40 #include "chrome/common/extensions/extension.h" | 40 #include "chrome/common/extensions/extension.h" |
| 41 #include "chrome/common/extensions/extension_constants.h" | 41 #include "chrome/common/extensions/extension_constants.h" |
| 42 #include "content/browser/browser_thread.h" | 42 #include "content/browser/browser_thread.h" |
| 43 #include "content/common/property_bag.h" | 43 #include "content/common/property_bag.h" |
| 44 #include "content/public/browser/notification_observer.h" | 44 #include "content/public/browser/notification_observer.h" |
| 45 #include "content/public/browser/notification_registrar.h" | 45 #include "content/public/browser/notification_registrar.h" |
| 46 | 46 |
| 47 class AppNotificationManager; | 47 class AppNotificationManager; |
| 48 class ComponentLoader; | |
| 48 class BookmarkExtensionEventRouter; | 49 class BookmarkExtensionEventRouter; |
| 49 class CrxInstaller; | 50 class CrxInstaller; |
| 50 class ExtensionBrowserEventRouter; | 51 class ExtensionBrowserEventRouter; |
| 51 class ExtensionContentSettingsStore; | 52 class ExtensionContentSettingsStore; |
| 52 class ExtensionCookiesEventRouter; | 53 class ExtensionCookiesEventRouter; |
| 53 class ExtensionDownloadsEventRouter; | 54 class ExtensionDownloadsEventRouter; |
| 54 class ExtensionFileBrowserEventRouter; | 55 class ExtensionFileBrowserEventRouter; |
| 55 class ExtensionGlobalError; | 56 class ExtensionGlobalError; |
| 56 class HistoryExtensionEventRouter; | |
| 57 class ExtensionInstallUI; | 57 class ExtensionInstallUI; |
| 58 class ExtensionManagementEventRouter; | 58 class ExtensionManagementEventRouter; |
| 59 class ExtensionPreferenceEventRouter; | 59 class ExtensionPreferenceEventRouter; |
| 60 class ExtensionServiceBackend; | |
| 61 class ExtensionSyncData; | 60 class ExtensionSyncData; |
| 62 class ExtensionToolbarModel; | 61 class ExtensionToolbarModel; |
| 63 class ExtensionUpdater; | 62 class ExtensionUpdater; |
| 64 class ExtensionWebNavigationEventRouter; | 63 class ExtensionWebNavigationEventRouter; |
| 64 class HistoryExtensionEventRouter; | |
| 65 class InstalledExtensionLoader; | |
| 65 class GURL; | 66 class GURL; |
| 66 class PendingExtensionManager; | 67 class PendingExtensionManager; |
| 67 class Profile; | 68 class Profile; |
| 68 class SyncData; | 69 class SyncData; |
| 70 class UnpackedInstaller; | |
| 69 class Version; | 71 class Version; |
| 70 | 72 |
| 71 namespace chromeos { | 73 namespace chromeos { |
| 72 class ExtensionInputMethodEventRouter; | 74 class ExtensionInputMethodEventRouter; |
| 73 } // namespace chromeos | 75 } // namespace chromeos |
| 74 | 76 |
| 75 // This is an interface class to encapsulate the dependencies that | 77 // This is an interface class to encapsulate the dependencies that |
| 76 // various classes have on ExtensionService. This allows easy mocking. | 78 // various classes have on ExtensionService. This allows easy mocking. |
| 77 class ExtensionServiceInterface : public SyncableService { | 79 class ExtensionServiceInterface : public SyncableService { |
| 78 public: | 80 public: |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 // themes sync to not use it directly. | 113 // themes sync to not use it directly. |
| 112 virtual void CheckForUpdatesSoon() = 0; | 114 virtual void CheckForUpdatesSoon() = 0; |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 // Manages installed and running Chromium extensions. | 117 // Manages installed and running Chromium extensions. |
| 116 class ExtensionService | 118 class ExtensionService |
| 117 : public ExtensionServiceInterface, | 119 : public ExtensionServiceInterface, |
| 118 public ExternalExtensionProviderInterface::VisitorInterface, | 120 public ExternalExtensionProviderInterface::VisitorInterface, |
| 119 public content::NotificationObserver { | 121 public content::NotificationObserver { |
| 120 public: | 122 public: |
| 121 // Information about a registered component extension. | |
| 122 struct ComponentExtensionInfo { | |
| 123 ComponentExtensionInfo(const std::string& manifest, | |
| 124 const FilePath& root_directory) | |
| 125 : manifest(manifest), | |
| 126 root_directory(root_directory) { | |
| 127 } | |
| 128 | |
| 129 bool Equals(const ComponentExtensionInfo& other) const; | |
| 130 | |
| 131 // The extension's manifest. This is required for component extensions so | |
| 132 // that ExtensionService doesn't need to go to disk to load them. | |
| 133 std::string manifest; | |
| 134 | |
| 135 // Directory where the extension is stored. | |
| 136 FilePath root_directory; | |
| 137 }; | |
| 138 | |
| 139 // The name of the directory inside the profile where extensions are | 123 // The name of the directory inside the profile where extensions are |
| 140 // installed to. | 124 // installed to. |
| 141 static const char* kInstallDirectoryName; | 125 static const char* kInstallDirectoryName; |
| 142 | 126 |
| 143 // If auto-updates are turned on, default to running every 5 hours. | 127 // If auto-updates are turned on, default to running every 5 hours. |
| 144 static const int kDefaultUpdateFrequencySeconds = 60 * 60 * 5; | 128 static const int kDefaultUpdateFrequencySeconds = 60 * 60 * 5; |
| 145 | 129 |
| 146 // The name of the directory inside the profile where per-extension settings | 130 // The name of the directory inside the profile where per-extension settings |
| 147 // are stored. | 131 // are stored. |
| 148 static const char* kSettingsDirectoryName; | 132 static const char* kSettingsDirectoryName; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 virtual ~ExtensionService(); | 167 virtual ~ExtensionService(); |
| 184 | 168 |
| 185 // Gets the list of currently installed extensions. | 169 // Gets the list of currently installed extensions. |
| 186 virtual const ExtensionList* extensions() const OVERRIDE; | 170 virtual const ExtensionList* extensions() const OVERRIDE; |
| 187 const ExtensionList* disabled_extensions() const; | 171 const ExtensionList* disabled_extensions() const; |
| 188 const ExtensionList* terminated_extensions() const; | 172 const ExtensionList* terminated_extensions() const; |
| 189 | 173 |
| 190 // Gets the object managing the set of pending extensions. | 174 // Gets the object managing the set of pending extensions. |
| 191 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; | 175 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; |
| 192 | 176 |
| 193 // Registers an extension to be loaded as a component extension. | |
| 194 void register_component_extension(const ComponentExtensionInfo& info) { | |
| 195 component_extension_manifests_.push_back(info); | |
| 196 } | |
| 197 | |
| 198 // Unregisters a component extension from the list of extensions to be loaded | |
| 199 void UnregisterComponentExtension(const ComponentExtensionInfo& info); | |
| 200 | |
| 201 const FilePath& install_directory() const { return install_directory_; } | 177 const FilePath& install_directory() const { return install_directory_; } |
| 202 | 178 |
| 203 AppsPromo* apps_promo() { return &apps_promo_; } | 179 AppsPromo* apps_promo() { return &apps_promo_; } |
| 204 | 180 |
| 205 // Whether this extension can run in an incognito window. | 181 // Whether this extension can run in an incognito window. |
| 206 virtual bool IsIncognitoEnabled(const std::string& extension_id) const; | 182 virtual bool IsIncognitoEnabled(const std::string& extension_id) const; |
| 207 virtual void SetIsIncognitoEnabled(const std::string& extension_id, | 183 virtual void SetIsIncognitoEnabled(const std::string& extension_id, |
| 208 bool enabled); | 184 bool enabled); |
| 209 | 185 |
| 210 // Returns true if the given extension can see events and data from another | 186 // Returns true if the given extension can see events and data from another |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 308 | 284 |
| 309 // Updates the |extension|'s granted permissions lists to include all | 285 // Updates the |extension|'s granted permissions lists to include all |
| 310 // permissions in the |extension|'s manifest and re-enables the | 286 // permissions in the |extension|'s manifest and re-enables the |
| 311 // extension. | 287 // extension. |
| 312 void GrantPermissionsAndEnableExtension(const Extension* extension); | 288 void GrantPermissionsAndEnableExtension(const Extension* extension); |
| 313 | 289 |
| 314 // Sets the |extension|'s active permissions to |permissions|. | 290 // Sets the |extension|'s active permissions to |permissions|. |
| 315 void UpdateActivePermissions(const Extension* extension, | 291 void UpdateActivePermissions(const Extension* extension, |
| 316 const ExtensionPermissionSet* permissions); | 292 const ExtensionPermissionSet* permissions); |
| 317 | 293 |
| 318 // Loads the extension from the directory |extension_path|. | |
| 319 void LoadExtension(const FilePath& extension_path); | |
| 320 | |
| 321 // Loads the extension from the directory |extension_path|. | |
| 322 // This version of this method is intended for testing only. | |
| 323 void LoadExtension(const FilePath& extension_path, bool prompt_for_plugins); | |
| 324 | |
| 325 // Same as above, but for use with command line switch --load-extension=path. | |
| 326 void LoadExtensionFromCommandLine(const FilePath& extension_path); | |
| 327 | |
| 328 // Loads any component extensions. | |
| 329 void LoadComponentExtensions(); | |
| 330 | |
| 331 // Loads particular component extension. | |
| 332 const Extension* LoadComponentExtension(const ComponentExtensionInfo& info); | |
| 333 | |
| 334 // Unloads particular component extension. | |
| 335 void UnloadComponentExtension(const ComponentExtensionInfo& info); | |
| 336 | |
| 337 // Loads all known extensions (used by startup and testing code). | |
| 338 void LoadAllExtensions(); | |
| 339 | |
| 340 // Check for updates (or potentially new extensions from external providers) | 294 // Check for updates (or potentially new extensions from external providers) |
| 341 void CheckForExternalUpdates(); | 295 void CheckForExternalUpdates(); |
| 342 | 296 |
| 343 // Unload the specified extension. | 297 // Unload the specified extension. |
| 344 void UnloadExtension(const std::string& extension_id, | 298 void UnloadExtension(const std::string& extension_id, |
| 345 extension_misc::UnloadedExtensionReason reason); | 299 extension_misc::UnloadedExtensionReason reason); |
| 346 | 300 |
| 347 // Unload all extensions. This is currently only called on shutdown, and | 301 // Unload all extensions. This is currently only called on shutdown, and |
| 348 // does not send notifications. | 302 // does not send notifications. |
| 349 void UnloadAllExtensions(); | 303 void UnloadAllExtensions(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 384 const SkBitmap& GetOmniboxPopupIcon(const std::string& extension_id); | 338 const SkBitmap& GetOmniboxPopupIcon(const std::string& extension_id); |
| 385 | 339 |
| 386 // Called when the initial extensions load has completed. | 340 // Called when the initial extensions load has completed. |
| 387 virtual void OnLoadedInstalledExtensions(); | 341 virtual void OnLoadedInstalledExtensions(); |
| 388 | 342 |
| 389 // Adds |extension| to this ExtensionService and notifies observers than an | 343 // Adds |extension| to this ExtensionService and notifies observers than an |
| 390 // extension has been loaded. Called by the backend after an extension has | 344 // extension has been loaded. Called by the backend after an extension has |
| 391 // been loaded from a file and installed. | 345 // been loaded from a file and installed. |
| 392 void AddExtension(const Extension* extension); | 346 void AddExtension(const Extension* extension); |
| 393 | 347 |
| 394 // Called by the backend when an unpacked extension has been loaded. | |
| 395 void OnLoadSingleExtension(const Extension* extension, | |
| 396 bool prompt_for_plugins); | |
| 397 | |
| 398 // Called by the backend when an extension has been installed. | 348 // Called by the backend when an extension has been installed. |
| 399 void OnExtensionInstalled( | 349 void OnExtensionInstalled( |
| 400 const Extension* extension, bool from_webstore, int page_index); | 350 const Extension* extension, bool from_webstore, int page_index); |
| 401 | 351 |
| 402 // Initializes the |extension|'s active permission set and disables the | 352 // Initializes the |extension|'s active permission set and disables the |
| 403 // extension if the privilege level has increased (e.g., due to an upgrade). | 353 // extension if the privilege level has increased (e.g., due to an upgrade). |
| 404 void InitializePermissions(const Extension* extension); | 354 void InitializePermissions(const Extension* extension); |
| 405 | 355 |
| 406 // Go through each extensions in pref, unload blacklisted extensions | 356 // Go through each extensions in pref, unload blacklisted extensions |
| 407 // and update the blacklist state in pref. | 357 // and update the blacklist state in pref. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 444 ExtensionPrefs* extension_prefs(); | 394 ExtensionPrefs* extension_prefs(); |
| 445 | 395 |
| 446 ExtensionSettingsFrontend* extension_settings_frontend(); | 396 ExtensionSettingsFrontend* extension_settings_frontend(); |
| 447 | 397 |
| 448 ExtensionContentSettingsStore* GetExtensionContentSettingsStore(); | 398 ExtensionContentSettingsStore* GetExtensionContentSettingsStore(); |
| 449 | 399 |
| 450 // Whether the extension service is ready. | 400 // Whether the extension service is ready. |
| 451 // TODO(skerner): Get rid of this method. crbug.com/63756 | 401 // TODO(skerner): Get rid of this method. crbug.com/63756 |
| 452 bool is_ready() { return ready_; } | 402 bool is_ready() { return ready_; } |
| 453 | 403 |
| 404 ComponentLoader* component_loader() { return component_loader_.get(); } | |
| 405 | |
| 454 // Note that this may return NULL if autoupdate is not turned on. | 406 // Note that this may return NULL if autoupdate is not turned on. |
| 455 ExtensionUpdater* updater(); | 407 ExtensionUpdater* updater(); |
| 456 | 408 |
| 457 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } | 409 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } |
| 458 | 410 |
| 459 ExtensionsQuotaService* quota_service() { return "a_service_; } | 411 ExtensionsQuotaService* quota_service() { return "a_service_; } |
| 460 | 412 |
| 461 ExtensionMenuManager* menu_manager() { return &menu_manager_; } | 413 ExtensionMenuManager* menu_manager() { return &menu_manager_; } |
| 462 | 414 |
| 463 AppNotificationManager* app_notification_manager() { | 415 AppNotificationManager* app_notification_manager() { |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 475 #if defined(OS_CHROMEOS) | 427 #if defined(OS_CHROMEOS) |
| 476 ExtensionFileBrowserEventRouter* file_browser_event_router() { | 428 ExtensionFileBrowserEventRouter* file_browser_event_router() { |
| 477 return file_browser_event_router_.get(); | 429 return file_browser_event_router_.get(); |
| 478 } | 430 } |
| 479 chromeos::ExtensionInputMethodEventRouter* input_method_event_router() { | 431 chromeos::ExtensionInputMethodEventRouter* input_method_event_router() { |
| 480 return input_method_event_router_.get(); | 432 return input_method_event_router_.get(); |
| 481 } | 433 } |
| 482 #endif | 434 #endif |
| 483 | 435 |
| 484 // Notify the frontend that there was an error loading an extension. | 436 // Notify the frontend that there was an error loading an extension. |
| 485 // This method is public because ExtensionServiceBackend can post to here. | 437 // This method is public because ExtensionLoadTask can post to here. |
|
Aaron Boodman
2011/10/28 22:21:58
TODO(aa): DIEDIEDIE
| |
| 486 void ReportExtensionLoadError(const FilePath& extension_path, | 438 void ReportExtensionLoadError(const FilePath& extension_path, |
| 487 const std::string& error, | 439 const std::string& error, |
| 488 bool be_noisy); | 440 bool be_noisy); |
| 489 | 441 |
| 490 // ExtensionHost of background page calls this method right after its render | 442 // ExtensionHost of background page calls this method right after its render |
| 491 // view has been created. | 443 // view has been created. |
| 492 void DidCreateRenderViewForBackgroundPage(ExtensionHost* host); | 444 void DidCreateRenderViewForBackgroundPage(ExtensionHost* host); |
| 493 | 445 |
| 494 // For the extension in |version_path| with |id|, check to see if it's an | 446 // For the extension in |version_path| with |id|, check to see if it's an |
| 495 // externally managed extension. If so, uninstall it. | 447 // externally managed extension. If so, uninstall it. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 551 // Record a histogram using the PermissionMessage enum values for each | 503 // Record a histogram using the PermissionMessage enum values for each |
| 552 // permission in |e|. | 504 // permission in |e|. |
| 553 // NOTE: If this is ever called with high frequency, the implementation may | 505 // NOTE: If this is ever called with high frequency, the implementation may |
| 554 // need to be made more efficient. | 506 // need to be made more efficient. |
| 555 static void RecordPermissionMessagesHistogram( | 507 static void RecordPermissionMessagesHistogram( |
| 556 const Extension* e, const char* histogram); | 508 const Extension* e, const char* histogram); |
| 557 | 509 |
| 558 // |client| can be NULL for a silent install. | 510 // |client| can be NULL for a silent install. |
| 559 scoped_refptr<CrxInstaller> MakeCrxInstaller(ExtensionInstallUI* client); | 511 scoped_refptr<CrxInstaller> MakeCrxInstaller(ExtensionInstallUI* client); |
| 560 | 512 |
| 513 scoped_refptr<UnpackedInstaller> MakeUnpackedInstaller(); | |
|
Aaron Boodman
2011/10/28 22:21:58
It seems a little unfortunate to me to have to hav
Yoyo Zhou
2011/10/31 21:58:15
Heh, I went back and forth on this myself. I did l
Aaron Boodman
2011/10/31 22:33:25
Can you try it? I'm really fired up about the idea
Yoyo Zhou
2011/11/01 21:50:57
Got rid of these two:
1. changed ES::MakeUnpackedI
| |
| 514 | |
| 515 scoped_refptr<InstalledExtensionLoader> MakeInstalledExtensionLoader(); | |
| 516 | |
| 561 #if defined(UNIT_TEST) | 517 #if defined(UNIT_TEST) |
| 562 void TrackTerminatedExtensionForTest(const Extension* extension) { | 518 void TrackTerminatedExtensionForTest(const Extension* extension) { |
| 563 TrackTerminatedExtension(extension); | 519 TrackTerminatedExtension(extension); |
| 564 } | 520 } |
| 565 #endif | 521 #endif |
| 566 | 522 |
| 567 ExtensionWarningSet* extension_warnings() { | 523 ExtensionWarningSet* extension_warnings() { |
| 568 return &extension_warnings_; | 524 return &extension_warnings_; |
| 569 } | 525 } |
| 570 | 526 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 662 // Handles sending notification that |extension| was loaded. | 618 // Handles sending notification that |extension| was loaded. |
| 663 void NotifyExtensionLoaded(const Extension* extension); | 619 void NotifyExtensionLoaded(const Extension* extension); |
| 664 | 620 |
| 665 // Handles sending notification that |extension| was unloaded. | 621 // Handles sending notification that |extension| was unloaded. |
| 666 void NotifyExtensionUnloaded(const Extension* extension, | 622 void NotifyExtensionUnloaded(const Extension* extension, |
| 667 extension_misc::UnloadedExtensionReason reason); | 623 extension_misc::UnloadedExtensionReason reason); |
| 668 | 624 |
| 669 // Helper that updates the active extension list used for crash reporting. | 625 // Helper that updates the active extension list used for crash reporting. |
| 670 void UpdateActiveExtensionsInCrashReporter(); | 626 void UpdateActiveExtensionsInCrashReporter(); |
| 671 | 627 |
| 672 // Helper method. Loads extension from prefs. | |
| 673 void LoadInstalledExtension(const ExtensionInfo& info, bool write_to_prefs); | |
| 674 | |
| 675 // We implement some Pepper plug-ins using NaCl to take advantage of NaCl's | 628 // We implement some Pepper plug-ins using NaCl to take advantage of NaCl's |
| 676 // strong sandbox. Typically, these NaCl modules are stored in extensions | 629 // strong sandbox. Typically, these NaCl modules are stored in extensions |
| 677 // and registered here. Not all NaCl modules need to register for a MIME | 630 // and registered here. Not all NaCl modules need to register for a MIME |
| 678 // type, just the ones that are responsible for rendering a particular MIME | 631 // type, just the ones that are responsible for rendering a particular MIME |
| 679 // type, like application/pdf. Note: We only register NaCl modules in the | 632 // type, like application/pdf. Note: We only register NaCl modules in the |
| 680 // browser process. | 633 // browser process. |
| 681 void RegisterNaClModule(const GURL& url, const std::string& mime_type); | 634 void RegisterNaClModule(const GURL& url, const std::string& mime_type); |
| 682 void UnregisterNaClModule(const GURL& url); | 635 void UnregisterNaClModule(const GURL& url); |
| 683 | 636 |
| 684 // Call UpdatePluginListWithNaClModules() after registering or unregistering | 637 // Call UpdatePluginListWithNaClModules() after registering or unregistering |
| 685 // a NaCl module to see those changes reflected in the PluginList. | 638 // a NaCl module to see those changes reflected in the PluginList. |
| 686 void UpdatePluginListWithNaClModules(); | 639 void UpdatePluginListWithNaClModules(); |
| 687 | 640 |
| 688 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); | 641 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); |
| 689 | 642 |
| 690 // Returns the flags that should be used with Extension::Create() for an | |
| 691 // extension that is already installed. | |
| 692 int GetExtensionCreateFlagsForInstalledExtension( | |
| 693 const ExtensionInfo* info); | |
| 694 | |
| 695 base::WeakPtrFactory<ExtensionService> weak_ptr_factory_; | 643 base::WeakPtrFactory<ExtensionService> weak_ptr_factory_; |
| 696 | 644 |
| 697 // The profile this ExtensionService is part of. | 645 // The profile this ExtensionService is part of. |
| 698 Profile* profile_; | 646 Profile* profile_; |
| 699 | 647 |
| 700 // Preferences for the owning profile (weak reference). | 648 // Preferences for the owning profile (weak reference). |
| 701 ExtensionPrefs* extension_prefs_; | 649 ExtensionPrefs* extension_prefs_; |
| 702 | 650 |
| 703 // Settings for the owning profile. | 651 // Settings for the owning profile. |
| 704 ExtensionSettingsFrontend extension_settings_frontend_; | 652 ExtensionSettingsFrontend extension_settings_frontend_; |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 729 | 677 |
| 730 // The full path to the directory where extensions are installed. | 678 // The full path to the directory where extensions are installed. |
| 731 FilePath install_directory_; | 679 FilePath install_directory_; |
| 732 | 680 |
| 733 // Whether or not extensions are enabled. | 681 // Whether or not extensions are enabled. |
| 734 bool extensions_enabled_; | 682 bool extensions_enabled_; |
| 735 | 683 |
| 736 // Whether to notify users when they attempt to install an extension. | 684 // Whether to notify users when they attempt to install an extension. |
| 737 bool show_extensions_prompts_; | 685 bool show_extensions_prompts_; |
| 738 | 686 |
| 739 // The backend that will do IO on behalf of this instance. | 687 // For loading and unloading component extensions. |
| 740 scoped_refptr<ExtensionServiceBackend> backend_; | 688 scoped_ptr<ComponentLoader> component_loader_; |
| 741 | 689 |
| 742 // Used by dispatchers to limit API quota for individual extensions. | 690 // Used by dispatchers to limit API quota for individual extensions. |
| 743 ExtensionsQuotaService quota_service_; | 691 ExtensionsQuotaService quota_service_; |
| 744 | 692 |
| 745 // Record that Init() has been called, and chrome::EXTENSIONS_READY | 693 // Record that Init() has been called, and chrome::EXTENSIONS_READY |
| 746 // has fired. | 694 // has fired. |
| 747 bool ready_; | 695 bool ready_; |
| 748 | 696 |
| 749 // Our extension updater, if updates are turned on. | 697 // Our extension updater, if updates are turned on. |
| 750 scoped_ptr<ExtensionUpdater> updater_; | 698 scoped_ptr<ExtensionUpdater> updater_; |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 778 // Keeps track of app notifications. | 726 // Keeps track of app notifications. |
| 779 scoped_refptr<AppNotificationManager> app_notification_manager_; | 727 scoped_refptr<AppNotificationManager> app_notification_manager_; |
| 780 | 728 |
| 781 // Keeps track of extension permissions. | 729 // Keeps track of extension permissions. |
| 782 ExtensionPermissionsManager permissions_manager_; | 730 ExtensionPermissionsManager permissions_manager_; |
| 783 | 731 |
| 784 // Keeps track of favicon-sized omnibox icons for extensions. | 732 // Keeps track of favicon-sized omnibox icons for extensions. |
| 785 ExtensionIconManager omnibox_icon_manager_; | 733 ExtensionIconManager omnibox_icon_manager_; |
| 786 ExtensionIconManager omnibox_popup_icon_manager_; | 734 ExtensionIconManager omnibox_popup_icon_manager_; |
| 787 | 735 |
| 788 // List of registered component extensions (see Extension::Location). | |
| 789 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; | |
| 790 RegisteredComponentExtensions component_extension_manifests_; | |
| 791 | |
| 792 // Manages the promotion of the web store. | 736 // Manages the promotion of the web store. |
| 793 AppsPromo apps_promo_; | 737 AppsPromo apps_promo_; |
| 794 | 738 |
| 795 // Flag to make sure event routers are only initialized once. | 739 // Flag to make sure event routers are only initialized once. |
| 796 bool event_routers_initialized_; | 740 bool event_routers_initialized_; |
| 797 | 741 |
| 798 scoped_ptr<ExtensionDownloadsEventRouter> downloads_event_router_; | 742 scoped_ptr<ExtensionDownloadsEventRouter> downloads_event_router_; |
| 799 | 743 |
| 800 scoped_ptr<HistoryExtensionEventRouter> history_event_router_; | 744 scoped_ptr<HistoryExtensionEventRouter> history_event_router_; |
| 801 | 745 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 836 ExtensionWarningSet extension_warnings_; | 780 ExtensionWarningSet extension_warnings_; |
| 837 | 781 |
| 838 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 782 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 839 InstallAppsWithUnlimtedStorage); | 783 InstallAppsWithUnlimtedStorage); |
| 840 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 784 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 841 InstallAppsAndCheckStorageProtection); | 785 InstallAppsAndCheckStorageProtection); |
| 842 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 786 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 843 }; | 787 }; |
| 844 | 788 |
| 845 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 789 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |