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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 void ReloadExtensionsForTest(); | 396 void ReloadExtensionsForTest(); |
397 | 397 |
398 // Clear all ExternalProviders. | 398 // Clear all ExternalProviders. |
399 void ClearProvidersForTesting(); | 399 void ClearProvidersForTesting(); |
400 | 400 |
401 // Adds an ExternalProviderInterface for the service to use during testing. | 401 // Adds an ExternalProviderInterface for the service to use during testing. |
402 // Takes ownership of |test_provider|. | 402 // Takes ownership of |test_provider|. |
403 void AddProviderForTesting( | 403 void AddProviderForTesting( |
404 extensions::ExternalProviderInterface* test_provider); | 404 extensions::ExternalProviderInterface* test_provider); |
405 | 405 |
| 406 // Simulate an extension being blacklisted for tests. |
| 407 void BlacklistExtensionForTest(const std::string& extension_id); |
| 408 |
406 #if defined(UNIT_TEST) | 409 #if defined(UNIT_TEST) |
407 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { | 410 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { |
408 TrackTerminatedExtension(extension); | 411 TrackTerminatedExtension(extension); |
409 } | 412 } |
410 | 413 |
411 void FinishInstallationForTest(const extensions::Extension* extension) { | 414 void FinishInstallationForTest(const extensions::Extension* extension) { |
412 FinishInstallation(extension, false /* not ephemeral */); | 415 FinishInstallation(extension, false /* not ephemeral */); |
413 } | 416 } |
414 #endif | 417 #endif |
415 | 418 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 GreylistedExtensionDisabled); | 703 GreylistedExtensionDisabled); |
701 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 704 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
702 GreylistDontEnableManuallyDisabled); | 705 GreylistDontEnableManuallyDisabled); |
703 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 706 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
704 GreylistUnknownDontChange); | 707 GreylistUnknownDontChange); |
705 | 708 |
706 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 709 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
707 }; | 710 }; |
708 | 711 |
709 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 712 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |