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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 void ReloadExtensionsForTest(); | 420 void ReloadExtensionsForTest(); |
421 | 421 |
422 // Clear all ExternalProviders. | 422 // Clear all ExternalProviders. |
423 void ClearProvidersForTesting(); | 423 void ClearProvidersForTesting(); |
424 | 424 |
425 // Adds an ExternalProviderInterface for the service to use during testing. | 425 // Adds an ExternalProviderInterface for the service to use during testing. |
426 // Takes ownership of |test_provider|. | 426 // Takes ownership of |test_provider|. |
427 void AddProviderForTesting( | 427 void AddProviderForTesting( |
428 extensions::ExternalProviderInterface* test_provider); | 428 extensions::ExternalProviderInterface* test_provider); |
429 | 429 |
| 430 // Simulate an extension being blacklisted for tests. |
| 431 void BlacklistExtensionForTest(const std::string& extension_id); |
| 432 |
430 #if defined(UNIT_TEST) | 433 #if defined(UNIT_TEST) |
431 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { | 434 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { |
432 TrackTerminatedExtension(extension); | 435 TrackTerminatedExtension(extension); |
433 } | 436 } |
434 | 437 |
435 void FinishInstallationForTest(const extensions::Extension* extension) { | 438 void FinishInstallationForTest(const extensions::Extension* extension) { |
436 FinishInstallation(extension, false /* not ephemeral */); | 439 FinishInstallation(extension, false /* not ephemeral */); |
437 } | 440 } |
438 #endif | 441 #endif |
439 | 442 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 GreylistedExtensionDisabled); | 728 GreylistedExtensionDisabled); |
726 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 729 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
727 GreylistDontEnableManuallyDisabled); | 730 GreylistDontEnableManuallyDisabled); |
728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 731 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
729 GreylistUnknownDontChange); | 732 GreylistUnknownDontChange); |
730 | 733 |
731 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 734 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
732 }; | 735 }; |
733 | 736 |
734 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 737 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |