Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Side by Side Diff: components/wifi_sync/wifi_credential_syncable_service_unittest.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/wifi_sync/wifi_credential_syncable_service_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/wifi_sync/wifi_credential_syncable_service.h" 5 #include "components/wifi_sync/wifi_credential_syncable_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 base::Time(), syncer::AttachmentIdList(), 139 base::Time(), syncer::AttachmentIdList(),
140 syncer::AttachmentServiceProxyForTest::Create())); 140 syncer::AttachmentServiceProxyForTest::Create()));
141 } 141 }
142 142
143 void StartSyncing() { 143 void StartSyncing() {
144 std::unique_ptr<FakeSyncChangeProcessor> change_processor( 144 std::unique_ptr<FakeSyncChangeProcessor> change_processor(
145 new FakeSyncChangeProcessor()); 145 new FakeSyncChangeProcessor());
146 change_processor_ = change_processor.get(); 146 change_processor_ = change_processor.get();
147 syncable_service_->MergeDataAndStartSyncing( 147 syncable_service_->MergeDataAndStartSyncing(
148 syncer::WIFI_CREDENTIALS, syncer::SyncDataList(), 148 syncer::WIFI_CREDENTIALS, syncer::SyncDataList(),
149 std::move(change_processor), 149 std::move(change_processor), base::MakeUnique<SyncErrorFactoryMock>());
150 base::WrapUnique(new SyncErrorFactoryMock()));
151 } 150 }
152 151
153 private: 152 private:
154 std::unique_ptr<WifiCredentialSyncableService> syncable_service_; 153 std::unique_ptr<WifiCredentialSyncableService> syncable_service_;
155 FakeWifiConfigDelegate* config_delegate_; // Owned by |syncable_service_| 154 FakeWifiConfigDelegate* config_delegate_; // Owned by |syncable_service_|
156 FakeSyncChangeProcessor* change_processor_; // Owned by |syncable_service_| 155 FakeSyncChangeProcessor* change_processor_; // Owned by |syncable_service_|
157 156
158 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceTest); 157 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceTest);
159 }; 158 };
160 159
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 MakeCredential(kSsidNonUtf8, SECURITY_CLASS_NONE, ""))); 334 MakeCredential(kSsidNonUtf8, SECURITY_CLASS_NONE, "")));
336 EXPECT_EQ(1, change_processor_changes_size()); 335 EXPECT_EQ(1, change_processor_changes_size());
337 EXPECT_FALSE( 336 EXPECT_FALSE(
338 AddToSyncedNetworks( 337 AddToSyncedNetworks(
339 "fake-item-id", 338 "fake-item-id",
340 MakeCredential(kSsidNonUtf8, SECURITY_CLASS_NONE, ""))); 339 MakeCredential(kSsidNonUtf8, SECURITY_CLASS_NONE, "")));
341 EXPECT_EQ(1, change_processor_changes_size()); 340 EXPECT_EQ(1, change_processor_changes_size());
342 } 341 }
343 342
344 } // namespace wifi_sync 343 } // namespace wifi_sync
OLDNEW
« no previous file with comments | « components/wifi_sync/wifi_credential_syncable_service_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698