| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 // Unload all extensions. Does not send notifications. | 422 // Unload all extensions. Does not send notifications. |
| 423 void UnloadAllExtensionsForTest(); | 423 void UnloadAllExtensionsForTest(); |
| 424 | 424 |
| 425 // Reloads all extensions. Does not notify that extensions are ready. | 425 // Reloads all extensions. Does not notify that extensions are ready. |
| 426 void ReloadExtensionsForTest(); | 426 void ReloadExtensionsForTest(); |
| 427 | 427 |
| 428 // Clear all ExternalProviders. | 428 // Clear all ExternalProviders. |
| 429 void ClearProvidersForTesting(); | 429 void ClearProvidersForTesting(); |
| 430 | 430 |
| 431 // Adds an ExternalProviderInterface for the service to use during testing. | 431 // Adds an ExternalProviderInterface for the service to use during testing. |
| 432 // Takes ownership of |test_provider|. | |
| 433 void AddProviderForTesting( | 432 void AddProviderForTesting( |
| 434 extensions::ExternalProviderInterface* test_provider); | 433 std::unique_ptr<extensions::ExternalProviderInterface> test_provider); |
| 435 | 434 |
| 436 // Simulate an extension being blacklisted for tests. | 435 // Simulate an extension being blacklisted for tests. |
| 437 void BlacklistExtensionForTest(const std::string& extension_id); | 436 void BlacklistExtensionForTest(const std::string& extension_id); |
| 438 | 437 |
| 439 #if defined(UNIT_TEST) | 438 #if defined(UNIT_TEST) |
| 440 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { | 439 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { |
| 441 TrackTerminatedExtension(extension->id()); | 440 TrackTerminatedExtension(extension->id()); |
| 442 } | 441 } |
| 443 | 442 |
| 444 void FinishInstallationForTest(const extensions::Extension* extension) { | 443 void FinishInstallationForTest(const extensions::Extension* extension) { |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 GreylistUnknownDontChange); | 745 GreylistUnknownDontChange); |
| 747 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 746 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 748 ManagementPolicyProhibitsEnableOnInstalled); | 747 ManagementPolicyProhibitsEnableOnInstalled); |
| 749 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 748 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 750 BlockAndUnblockBlacklistedExtension); | 749 BlockAndUnblockBlacklistedExtension); |
| 751 | 750 |
| 752 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 751 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 753 }; | 752 }; |
| 754 | 753 |
| 755 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 754 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |