| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // themes sync to not use it directly. | 112 // themes sync to not use it directly. |
| 113 virtual void CheckForUpdatesSoon() = 0; | 113 virtual void CheckForUpdatesSoon() = 0; |
| 114 | 114 |
| 115 virtual void AddExtension(const extensions::Extension* extension) = 0; | 115 virtual void AddExtension(const extensions::Extension* extension) = 0; |
| 116 virtual void AddComponentExtension( | 116 virtual void AddComponentExtension( |
| 117 const extensions::Extension* extension) = 0; | 117 const extensions::Extension* extension) = 0; |
| 118 | 118 |
| 119 virtual void UnloadExtension( | 119 virtual void UnloadExtension( |
| 120 const std::string& extension_id, | 120 const std::string& extension_id, |
| 121 extension_misc::UnloadedExtensionReason reason) = 0; | 121 extension_misc::UnloadedExtensionReason reason) = 0; |
| 122 virtual void RemoveComponentExtension(const std::string& extension_id) = 0; |
| 122 | 123 |
| 123 virtual void SyncExtensionChangeIfNeeded( | 124 virtual void SyncExtensionChangeIfNeeded( |
| 124 const extensions::Extension& extension) = 0; | 125 const extensions::Extension& extension) = 0; |
| 125 | 126 |
| 126 virtual bool is_ready() = 0; | 127 virtual bool is_ready() = 0; |
| 127 | 128 |
| 128 // Returns task runner for crx installation file I/O operations. | 129 // Returns task runner for crx installation file I/O operations. |
| 129 virtual base::SequencedTaskRunner* GetFileTaskRunner() = 0; | 130 virtual base::SequencedTaskRunner* GetFileTaskRunner() = 0; |
| 130 }; | 131 }; |
| 131 | 132 |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 const extensions::Extension* extension); | 371 const extensions::Extension* extension); |
| 371 | 372 |
| 372 // Check for updates (or potentially new extensions from external providers) | 373 // Check for updates (or potentially new extensions from external providers) |
| 373 void CheckForExternalUpdates(); | 374 void CheckForExternalUpdates(); |
| 374 | 375 |
| 375 // Unload the specified extension. | 376 // Unload the specified extension. |
| 376 virtual void UnloadExtension( | 377 virtual void UnloadExtension( |
| 377 const std::string& extension_id, | 378 const std::string& extension_id, |
| 378 extension_misc::UnloadedExtensionReason reason) OVERRIDE; | 379 extension_misc::UnloadedExtensionReason reason) OVERRIDE; |
| 379 | 380 |
| 381 // Remove the specified component extension. |
| 382 virtual void RemoveComponentExtension(const std::string& extension_id) |
| 383 OVERRIDE; |
| 384 |
| 380 // Unload all extensions. This is currently only called on shutdown, and | 385 // Unload all extensions. This is currently only called on shutdown, and |
| 381 // does not send notifications. | 386 // does not send notifications. |
| 382 void UnloadAllExtensions(); | 387 void UnloadAllExtensions(); |
| 383 | 388 |
| 384 // Called only by testing. | 389 // Called only by testing. |
| 385 void ReloadExtensions(); | 390 void ReloadExtensions(); |
| 386 | 391 |
| 387 // Scan the extension directory and clean up the cruft. | 392 // Scan the extension directory and clean up the cruft. |
| 388 void GarbageCollectExtensions(); | 393 void GarbageCollectExtensions(); |
| 389 | 394 |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 syncer::SyncableService::StartSyncFlare flare_; | 966 syncer::SyncableService::StartSyncFlare flare_; |
| 962 | 967 |
| 963 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 968 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 964 InstallAppsWithUnlimtedStorage); | 969 InstallAppsWithUnlimtedStorage); |
| 965 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 970 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 966 InstallAppsAndCheckStorageProtection); | 971 InstallAppsAndCheckStorageProtection); |
| 967 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 972 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 968 }; | 973 }; |
| 969 | 974 |
| 970 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 975 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |