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

Side by Side Diff: sync/engine/directory_update_handler_unittest.cc

Issue 1539843002: Convert Pass()→std::move() in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "sync/engine/directory_update_handler.h" 5 #include "sync/engine/directory_update_handler.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const std::string& id, 107 const std::string& id,
108 const std::string& parent, 108 const std::string& parent,
109 const ModelType& type) { 109 const ModelType& type) {
110 scoped_ptr<sync_pb::SyncEntity> e(new sync_pb::SyncEntity()); 110 scoped_ptr<sync_pb::SyncEntity> e(new sync_pb::SyncEntity());
111 e->set_id_string(id); 111 e->set_id_string(id);
112 e->set_parent_id_string(parent); 112 e->set_parent_id_string(parent);
113 e->set_non_unique_name(id); 113 e->set_non_unique_name(id);
114 e->set_name(id); 114 e->set_name(id);
115 e->set_version(kDefaultVersion); 115 e->set_version(kDefaultVersion);
116 AddDefaultFieldValue(type, e->mutable_specifics()); 116 AddDefaultFieldValue(type, e->mutable_specifics());
117 return e.Pass(); 117 return e;
118 } 118 }
119 119
120 void DirectoryUpdateHandlerProcessUpdateTest::UpdateSyncEntities( 120 void DirectoryUpdateHandlerProcessUpdateTest::UpdateSyncEntities(
121 DirectoryUpdateHandler* handler, 121 DirectoryUpdateHandler* handler,
122 const SyncEntityList& applicable_updates, 122 const SyncEntityList& applicable_updates,
123 sessions::StatusController* status) { 123 sessions::StatusController* status) {
124 syncable::ModelNeutralWriteTransaction trans(FROM_HERE, UNITTEST, dir()); 124 syncable::ModelNeutralWriteTransaction trans(FROM_HERE, UNITTEST, dir());
125 handler->UpdateSyncEntities(&trans, applicable_updates, status); 125 handler->UpdateSyncEntities(&trans, applicable_updates, status);
126 } 126 }
127 127
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 const UpdateCounters& counters = GetArticlesUpdateCounters(); 1151 const UpdateCounters& counters = GetArticlesUpdateCounters();
1152 EXPECT_EQ(1, counters.num_updates_applied); 1152 EXPECT_EQ(1, counters.num_updates_applied);
1153 EXPECT_EQ(1, counters.num_local_overwrites); 1153 EXPECT_EQ(1, counters.num_local_overwrites);
1154 EXPECT_EQ(0, counters.num_server_overwrites); 1154 EXPECT_EQ(0, counters.num_server_overwrites);
1155 local_metadata = entry_factory()->GetLocalAttachmentMetadataForItem(handle); 1155 local_metadata = entry_factory()->GetLocalAttachmentMetadataForItem(handle);
1156 EXPECT_EQ(server_metadata.SerializeAsString(), 1156 EXPECT_EQ(server_metadata.SerializeAsString(),
1157 local_metadata.SerializeAsString()); 1157 local_metadata.SerializeAsString());
1158 } 1158 }
1159 1159
1160 } // namespace syncer 1160 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698