| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/external_provider_impl.h" | 5 #include "chrome/browser/extensions/external_provider_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 data_dir().Append("external_standalone"))); | 64 data_dir().Append("external_standalone"))); |
| 65 } else { | 65 } else { |
| 66 external_externsions_overrides_.reset(new base::ScopedPathOverride( | 66 external_externsions_overrides_.reset(new base::ScopedPathOverride( |
| 67 chrome::DIR_EXTERNAL_EXTENSIONS, data_dir().Append("external"))); | 67 chrome::DIR_EXTERNAL_EXTENSIONS, data_dir().Append("external"))); |
| 68 } | 68 } |
| 69 | 69 |
| 70 ProviderCollection providers; | 70 ProviderCollection providers; |
| 71 extensions::ExternalProviderImpl::CreateExternalProviders( | 71 extensions::ExternalProviderImpl::CreateExternalProviders( |
| 72 service_, profile_.get(), &providers); | 72 service_, profile_.get(), &providers); |
| 73 | 73 |
| 74 for (ProviderCollection::iterator i = providers.begin(); | 74 for (std::unique_ptr<ExternalProviderInterface>& provider : providers) |
| 75 i != providers.end(); | 75 service_->AddProviderForTesting(std::move(provider)); |
| 76 ++i) { | |
| 77 service_->AddProviderForTesting(i->release()); | |
| 78 } | |
| 79 } | 76 } |
| 80 | 77 |
| 81 // ExtensionServiceTestBase overrides: | 78 // ExtensionServiceTestBase overrides: |
| 82 void SetUp() override { | 79 void SetUp() override { |
| 83 ExtensionServiceTestBase::SetUp(); | 80 ExtensionServiceTestBase::SetUp(); |
| 84 } | 81 } |
| 85 | 82 |
| 86 void TearDown() override { | 83 void TearDown() override { |
| 87 chromeos::KioskAppManager::Shutdown(); | 84 chromeos::KioskAppManager::Shutdown(); |
| 88 } | 85 } |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 new syncer::SyncErrorFactoryMock())); | 203 new syncer::SyncErrorFactoryMock())); |
| 207 | 204 |
| 208 content::WindowedNotificationObserver( | 205 content::WindowedNotificationObserver( |
| 209 extensions::NOTIFICATION_CRX_INSTALLER_DONE, | 206 extensions::NOTIFICATION_CRX_INSTALLER_DONE, |
| 210 content::NotificationService::AllSources()).Wait(); | 207 content::NotificationService::AllSources()).Wait(); |
| 211 | 208 |
| 212 EXPECT_TRUE(service_->GetInstalledExtension(kStandaloneAppId)); | 209 EXPECT_TRUE(service_->GetInstalledExtension(kStandaloneAppId)); |
| 213 } | 210 } |
| 214 | 211 |
| 215 } // namespace extensions | 212 } // namespace extensions |
| OLD | NEW |