| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 virtual bool OnExternalExtensionFileFound( | 471 virtual bool OnExternalExtensionFileFound( |
| 472 const std::string& id, | 472 const std::string& id, |
| 473 const base::Version* version, | 473 const base::Version* version, |
| 474 const base::FilePath& path, | 474 const base::FilePath& path, |
| 475 extensions::Manifest::Location location, | 475 extensions::Manifest::Location location, |
| 476 int creation_flags, | 476 int creation_flags, |
| 477 bool mark_acknowledged) OVERRIDE; | 477 bool mark_acknowledged) OVERRIDE; |
| 478 | 478 |
| 479 virtual bool OnExternalExtensionUpdateUrlFound( | 479 virtual bool OnExternalExtensionUpdateUrlFound( |
| 480 const std::string& id, | 480 const std::string& id, |
| 481 const std::string& install_parameter, |
| 481 const GURL& update_url, | 482 const GURL& update_url, |
| 482 extensions::Manifest::Location location, | 483 extensions::Manifest::Location location, |
| 483 int creation_flags, | 484 int creation_flags, |
| 484 bool mark_acknowledged) OVERRIDE; | 485 bool mark_acknowledged) OVERRIDE; |
| 485 | 486 |
| 486 virtual void OnExternalProviderReady( | 487 virtual void OnExternalProviderReady( |
| 487 const extensions::ExternalProviderInterface* provider) OVERRIDE; | 488 const extensions::ExternalProviderInterface* provider) OVERRIDE; |
| 488 | 489 |
| 489 // Returns true when all the external extension providers are ready. | 490 // Returns true when all the external extension providers are ready. |
| 490 bool AreAllExternalProvidersReady() const; | 491 bool AreAllExternalProvidersReady() const; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 void TrackTerminatedExtension(const extensions::Extension* extension); | 609 void TrackTerminatedExtension(const extensions::Extension* extension); |
| 609 | 610 |
| 610 // Removes the extension with the given id from the list of | 611 // Removes the extension with the given id from the list of |
| 611 // terminated extensions if it is there. | 612 // terminated extensions if it is there. |
| 612 void UntrackTerminatedExtension(const std::string& id); | 613 void UntrackTerminatedExtension(const std::string& id); |
| 613 | 614 |
| 614 // Update preferences for a new or updated extension; notify observers that | 615 // Update preferences for a new or updated extension; notify observers that |
| 615 // the extension is installed, e.g., to update event handlers on background | 616 // the extension is installed, e.g., to update event handlers on background |
| 616 // pages; and perform other extension install tasks before calling | 617 // pages; and perform other extension install tasks before calling |
| 617 // AddExtension. | 618 // AddExtension. |
| 618 void AddNewOrUpdatedExtension( | 619 void AddNewOrUpdatedExtension(const extensions::Extension* extension, |
| 619 const extensions::Extension* extension, | 620 extensions::Extension::State initial_state, |
| 620 extensions::Extension::State initial_state, | 621 extensions::BlacklistState blacklist_state, |
| 621 extensions::BlacklistState blacklist_state, | 622 const syncer::StringOrdinal& page_ordinal, |
| 622 const syncer::StringOrdinal& page_ordinal); | 623 const std::string& install_parameter); |
| 623 | 624 |
| 624 // Handles sending notification that |extension| was loaded. | 625 // Handles sending notification that |extension| was loaded. |
| 625 void NotifyExtensionLoaded(const extensions::Extension* extension); | 626 void NotifyExtensionLoaded(const extensions::Extension* extension); |
| 626 | 627 |
| 627 // Handles sending notification that |extension| was unloaded. | 628 // Handles sending notification that |extension| was unloaded. |
| 628 void NotifyExtensionUnloaded( | 629 void NotifyExtensionUnloaded( |
| 629 const extensions::Extension* extension, | 630 const extensions::Extension* extension, |
| 630 extensions::UnloadedExtensionInfo::Reason reason); | 631 extensions::UnloadedExtensionInfo::Reason reason); |
| 631 | 632 |
| 632 // Common helper to finish installing the given extension. | 633 // Common helper to finish installing the given extension. |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 840 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 840 GreylistedExtensionDisabled); | 841 GreylistedExtensionDisabled); |
| 841 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 842 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 842 GreylistDontEnableManuallyDisabled); | 843 GreylistDontEnableManuallyDisabled); |
| 843 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 844 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 844 GreylistUnknownDontChange); | 845 GreylistUnknownDontChange); |
| 845 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 846 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 846 }; | 847 }; |
| 847 | 848 |
| 848 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 849 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |