| Index: chromeos/components/tether/tether_host_fetcher_unittest.cc
|
| diff --git a/chromeos/components/tether/tether_host_fetcher_unittest.cc b/chromeos/components/tether/tether_host_fetcher_unittest.cc
|
| index 6c4a9271846999c2647f727b84d09793e0c10eb9..cb8c8d70c4566075559975b7c39a444a561902a3 100644
|
| --- a/chromeos/components/tether/tether_host_fetcher_unittest.cc
|
| +++ b/chromeos/components/tether/tether_host_fetcher_unittest.cc
|
| @@ -90,6 +90,18 @@ CreateTetherExternalDeviceInfosForRemoteDevices(
|
| return device_infos;
|
| }
|
|
|
| +class TestTetherHostFetcher : public TetherHostFetcher {
|
| + public:
|
| + TestTetherHostFetcher(const std::string& user_id,
|
| + const std::string& user_private_key,
|
| + cryptauth::CryptAuthService* cryptauth_service,
|
| + cryptauth::CryptAuthDeviceManager* device_manager)
|
| + : TetherHostFetcher(user_id,
|
| + user_private_key,
|
| + cryptauth_service,
|
| + device_manager) {}
|
| +};
|
| +
|
| } // namespace
|
|
|
| class TetherHostFetcherTest : public testing::Test {
|
| @@ -97,7 +109,8 @@ class TetherHostFetcherTest : public testing::Test {
|
| class TestRemoteDeviceLoaderFactory
|
| : public cryptauth::RemoteDeviceLoader::Factory {
|
| public:
|
| - TestRemoteDeviceLoaderFactory(TetherHostFetcherTest* test) : test_(test) {}
|
| + explicit TestRemoteDeviceLoaderFactory(TetherHostFetcherTest* test)
|
| + : test_(test) {}
|
|
|
| std::unique_ptr<cryptauth::RemoteDeviceLoader> BuildInstance(
|
| const std::vector<cryptauth::ExternalDeviceInfo>& device_info_list,
|
| @@ -157,9 +170,9 @@ class TetherHostFetcherTest : public testing::Test {
|
| cryptauth::RemoteDeviceLoader::Factory::SetInstanceForTesting(
|
| test_device_loader_factory_.get());
|
|
|
| - tether_host_fetcher_ = base::MakeUnique<TetherHostFetcher>(
|
| + tether_host_fetcher_ = base::WrapUnique(new TestTetherHostFetcher(
|
| std::string(kTestUserId), std::string(kTestUserPrivateKey),
|
| - fake_cryptauth_service_.get(), mock_device_manager_.get());
|
| + fake_cryptauth_service_.get(), mock_device_manager_.get()));
|
| }
|
|
|
| void OnTetherHostListFetched(const cryptauth::RemoteDeviceList& device_list) {
|
| @@ -181,7 +194,7 @@ class TetherHostFetcherTest : public testing::Test {
|
| std::unique_ptr<NiceMock<MockDeviceManager>> mock_device_manager_;
|
| std::unique_ptr<TestRemoteDeviceLoaderFactory> test_device_loader_factory_;
|
|
|
| - std::unique_ptr<TetherHostFetcher> tether_host_fetcher_;
|
| + std::unique_ptr<TestTetherHostFetcher> tether_host_fetcher_;
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(TetherHostFetcherTest);
|
| @@ -265,4 +278,4 @@ TEST_F(TetherHostFetcherTest, TestMultipleSimultaneousRequests) {
|
|
|
| } // namespace tether
|
|
|
| -} // namespace cryptauth
|
| +} // namespace chromeos
|
|
|