| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "chrome/browser/extensions/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 ExtensionServiceTest() { | 580 ExtensionServiceTest() { |
| 581 // The extension subsystem posts logging tasks to be done after | 581 // The extension subsystem posts logging tasks to be done after |
| 582 // browser startup. There's no StartupObserver as there normally | 582 // browser startup. There's no StartupObserver as there normally |
| 583 // would be since we're in a unit test, so we have to explicitly | 583 // would be since we're in a unit test, so we have to explicitly |
| 584 // note tasks should be processed. | 584 // note tasks should be processed. |
| 585 AfterStartupTaskUtils::SetBrowserStartupIsCompleteForTesting(); | 585 AfterStartupTaskUtils::SetBrowserStartupIsCompleteForTesting(); |
| 586 } | 586 } |
| 587 | 587 |
| 588 void AddMockExternalProvider( | 588 void AddMockExternalProvider( |
| 589 extensions::ExternalProviderInterface* provider) { | 589 extensions::ExternalProviderInterface* provider) { |
| 590 service()->AddProviderForTesting(provider); | 590 service()->AddProviderForTesting(base::WrapUnique(provider)); |
| 591 } | 591 } |
| 592 | 592 |
| 593 protected: | 593 protected: |
| 594 // Paths to some of the fake extensions. | 594 // Paths to some of the fake extensions. |
| 595 base::FilePath good1_path() { | 595 base::FilePath good1_path() { |
| 596 return data_dir() | 596 return data_dir() |
| 597 .AppendASCII("good") | 597 .AppendASCII("good") |
| 598 .AppendASCII("Extensions") | 598 .AppendASCII("Extensions") |
| 599 .AppendASCII(good1) | 599 .AppendASCII(good1) |
| 600 .AppendASCII("2"); | 600 .AppendASCII("2"); |
| (...skipping 6311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6912 | 6912 |
| 6913 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, | 6913 service()->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, |
| 6914 content::Source<Profile>(profile()), | 6914 content::Source<Profile>(profile()), |
| 6915 content::NotificationService::NoDetails()); | 6915 content::NotificationService::NoDetails()); |
| 6916 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); | 6916 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); |
| 6917 EXPECT_EQ(0u, registry()->enabled_extensions().size()); | 6917 EXPECT_EQ(0u, registry()->enabled_extensions().size()); |
| 6918 EXPECT_EQ(0u, registry()->disabled_extensions().size()); | 6918 EXPECT_EQ(0u, registry()->disabled_extensions().size()); |
| 6919 EXPECT_EQ(0u, registry()->terminated_extensions().size()); | 6919 EXPECT_EQ(0u, registry()->terminated_extensions().size()); |
| 6920 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); | 6920 EXPECT_EQ(0u, registry()->blacklisted_extensions().size()); |
| 6921 } | 6921 } |
| OLD | NEW |