| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // |page_ordinal| is the location of the extension in the app launcher. | 274 // |page_ordinal| is the location of the extension in the app launcher. |
| 275 // |has_requirement_errors| is true if requirements of the extension weren't | 275 // |has_requirement_errors| is true if requirements of the extension weren't |
| 276 // met (for example graphics capabilities). | 276 // met (for example graphics capabilities). |
| 277 // |blacklist_state| will be BLACKLISTED if the extension is blacklisted. | 277 // |blacklist_state| will be BLACKLISTED if the extension is blacklisted. |
| 278 // |wait_for_idle| may be false to install the extension immediately. | 278 // |wait_for_idle| may be false to install the extension immediately. |
| 279 void OnExtensionInstalled( | 279 void OnExtensionInstalled( |
| 280 const extensions::Extension* extension, | 280 const extensions::Extension* extension, |
| 281 const syncer::StringOrdinal& page_ordinal, | 281 const syncer::StringOrdinal& page_ordinal, |
| 282 bool has_requirement_errors, | 282 bool has_requirement_errors, |
| 283 extensions::BlacklistState blacklist_state, | 283 extensions::BlacklistState blacklist_state, |
| 284 bool is_ephemeral, |
| 284 bool wait_for_idle); | 285 bool wait_for_idle); |
| 285 | 286 |
| 286 // Checks for delayed installation for all pending installs. | 287 // Checks for delayed installation for all pending installs. |
| 287 void MaybeFinishDelayedInstallations(); | 288 void MaybeFinishDelayedInstallations(); |
| 288 | 289 |
| 289 // Similar to FinishInstallation, but first checks if there still is an update | 290 // Similar to FinishInstallation, but first checks if there still is an update |
| 290 // pending for the extension, and makes sure the extension is still idle. | 291 // pending for the extension, and makes sure the extension is still idle. |
| 291 void MaybeFinishDelayedInstallation(const std::string& extension_id); | 292 void MaybeFinishDelayedInstallation(const std::string& extension_id); |
| 292 | 293 |
| 293 // Finishes installation of an update for an extension with the specified id, | 294 // Finishes installation of an update for an extension with the specified id, |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 // terminated extensions if it is there. | 494 // terminated extensions if it is there. |
| 494 void UntrackTerminatedExtension(const std::string& id); | 495 void UntrackTerminatedExtension(const std::string& id); |
| 495 | 496 |
| 496 // Update preferences for a new or updated extension; notify observers that | 497 // Update preferences for a new or updated extension; notify observers that |
| 497 // the extension is installed, e.g., to update event handlers on background | 498 // the extension is installed, e.g., to update event handlers on background |
| 498 // pages; and perform other extension install tasks before calling | 499 // pages; and perform other extension install tasks before calling |
| 499 // AddExtension. | 500 // AddExtension. |
| 500 void AddNewOrUpdatedExtension(const extensions::Extension* extension, | 501 void AddNewOrUpdatedExtension(const extensions::Extension* extension, |
| 501 extensions::Extension::State initial_state, | 502 extensions::Extension::State initial_state, |
| 502 extensions::BlacklistState blacklist_state, | 503 extensions::BlacklistState blacklist_state, |
| 504 bool is_ephemeral, |
| 503 const syncer::StringOrdinal& page_ordinal, | 505 const syncer::StringOrdinal& page_ordinal, |
| 504 const std::string& install_parameter); | 506 const std::string& install_parameter); |
| 505 | 507 |
| 506 // Handles sending notification that |extension| was loaded. | 508 // Handles sending notification that |extension| was loaded. |
| 507 void NotifyExtensionLoaded(const extensions::Extension* extension); | 509 void NotifyExtensionLoaded(const extensions::Extension* extension); |
| 508 | 510 |
| 509 // Handles sending notification that |extension| was unloaded. | 511 // Handles sending notification that |extension| was unloaded. |
| 510 void NotifyExtensionUnloaded( | 512 void NotifyExtensionUnloaded( |
| 511 const extensions::Extension* extension, | 513 const extensions::Extension* extension, |
| 512 extensions::UnloadedExtensionInfo::Reason reason); | 514 extensions::UnloadedExtensionInfo::Reason reason); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 709 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 708 GreylistedExtensionDisabled); | 710 GreylistedExtensionDisabled); |
| 709 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 711 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 710 GreylistDontEnableManuallyDisabled); | 712 GreylistDontEnableManuallyDisabled); |
| 711 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 713 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 712 GreylistUnknownDontChange); | 714 GreylistUnknownDontChange); |
| 713 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 715 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 714 }; | 716 }; |
| 715 | 717 |
| 716 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 718 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |