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

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

Issue 1552023002: Convert Pass()→std::move() in //components (CrOS edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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.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
9 #include <string> 8 #include <string>
9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/tracked_objects.h" 15 #include "base/tracked_objects.h"
16 #include "components/wifi_sync/wifi_config_delegate.h" 16 #include "components/wifi_sync/wifi_config_delegate.h"
17 #include "components/wifi_sync/wifi_credential.h" 17 #include "components/wifi_sync/wifi_credential.h"
18 #include "components/wifi_sync/wifi_security_class.h" 18 #include "components/wifi_sync/wifi_security_class.h"
19 #include "sync/api/attachments/attachment_id.h" 19 #include "sync/api/attachments/attachment_id.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 base::Time(), syncer::AttachmentIdList(), 137 base::Time(), syncer::AttachmentIdList(),
138 syncer::AttachmentServiceProxyForTest::Create())); 138 syncer::AttachmentServiceProxyForTest::Create()));
139 } 139 }
140 140
141 void StartSyncing() { 141 void StartSyncing() {
142 scoped_ptr<FakeSyncChangeProcessor> change_processor( 142 scoped_ptr<FakeSyncChangeProcessor> change_processor(
143 new FakeSyncChangeProcessor()); 143 new FakeSyncChangeProcessor());
144 change_processor_ = change_processor.get(); 144 change_processor_ = change_processor.get();
145 syncable_service_->MergeDataAndStartSyncing( 145 syncable_service_->MergeDataAndStartSyncing(
146 syncer::WIFI_CREDENTIALS, syncer::SyncDataList(), 146 syncer::WIFI_CREDENTIALS, syncer::SyncDataList(),
147 change_processor.Pass(), make_scoped_ptr(new SyncErrorFactoryMock())); 147 std::move(change_processor),
148 make_scoped_ptr(new SyncErrorFactoryMock()));
148 } 149 }
149 150
150 private: 151 private:
151 scoped_ptr<WifiCredentialSyncableService> syncable_service_; 152 scoped_ptr<WifiCredentialSyncableService> syncable_service_;
152 FakeWifiConfigDelegate* config_delegate_; // Owned by |syncable_service_| 153 FakeWifiConfigDelegate* config_delegate_; // Owned by |syncable_service_|
153 FakeSyncChangeProcessor* change_processor_; // Owned by |syncable_service_| 154 FakeSyncChangeProcessor* change_processor_; // Owned by |syncable_service_|
154 155
155 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceTest); 156 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceTest);
156 }; 157 };
157 158
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 MakeCredential(kSsidNonUtf8, SECURITY_CLASS_NONE, ""))); 333 MakeCredential(kSsidNonUtf8, SECURITY_CLASS_NONE, "")));
333 EXPECT_EQ(1, change_processor_changes_size()); 334 EXPECT_EQ(1, change_processor_changes_size());
334 EXPECT_FALSE( 335 EXPECT_FALSE(
335 AddToSyncedNetworks( 336 AddToSyncedNetworks(
336 "fake-item-id", 337 "fake-item-id",
337 MakeCredential(kSsidNonUtf8, SECURITY_CLASS_NONE, ""))); 338 MakeCredential(kSsidNonUtf8, SECURITY_CLASS_NONE, "")));
338 EXPECT_EQ(1, change_processor_changes_size()); 339 EXPECT_EQ(1, change_processor_changes_size());
339 } 340 }
340 341
341 } // namespace wifi_sync 342 } // namespace wifi_sync
OLDNEW
« no previous file with comments | « components/wifi_sync/wifi_credential_syncable_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698