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

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: Cleaned up Created 4 years, 12 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 | « sync/api/mock_model_type_store.cc ('k') | sync/engine/model_type_worker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const std::string& id, 110 const std::string& id,
111 const std::string& parent, 111 const std::string& parent,
112 const ModelType& type) { 112 const ModelType& type) {
113 scoped_ptr<sync_pb::SyncEntity> e(new sync_pb::SyncEntity()); 113 scoped_ptr<sync_pb::SyncEntity> e(new sync_pb::SyncEntity());
114 e->set_id_string(id); 114 e->set_id_string(id);
115 e->set_parent_id_string(parent); 115 e->set_parent_id_string(parent);
116 e->set_non_unique_name(id); 116 e->set_non_unique_name(id);
117 e->set_name(id); 117 e->set_name(id);
118 e->set_version(kDefaultVersion); 118 e->set_version(kDefaultVersion);
119 AddDefaultFieldValue(type, e->mutable_specifics()); 119 AddDefaultFieldValue(type, e->mutable_specifics());
120 return e.Pass(); 120 return e;
121 } 121 }
122 122
123 void DirectoryUpdateHandlerProcessUpdateTest::UpdateSyncEntities( 123 void DirectoryUpdateHandlerProcessUpdateTest::UpdateSyncEntities(
124 DirectoryUpdateHandler* handler, 124 DirectoryUpdateHandler* handler,
125 const SyncEntityList& applicable_updates, 125 const SyncEntityList& applicable_updates,
126 sessions::StatusController* status) { 126 sessions::StatusController* status) {
127 syncable::ModelNeutralWriteTransaction trans(FROM_HERE, UNITTEST, dir()); 127 syncable::ModelNeutralWriteTransaction trans(FROM_HERE, UNITTEST, dir());
128 handler->UpdateSyncEntities(&trans, applicable_updates, status); 128 handler->UpdateSyncEntities(&trans, applicable_updates, status);
129 } 129 }
130 130
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 const UpdateCounters& counters = GetArticlesUpdateCounters(); 1150 const UpdateCounters& counters = GetArticlesUpdateCounters();
1151 EXPECT_EQ(1, counters.num_updates_applied); 1151 EXPECT_EQ(1, counters.num_updates_applied);
1152 EXPECT_EQ(1, counters.num_local_overwrites); 1152 EXPECT_EQ(1, counters.num_local_overwrites);
1153 EXPECT_EQ(0, counters.num_server_overwrites); 1153 EXPECT_EQ(0, counters.num_server_overwrites);
1154 local_metadata = entry_factory()->GetLocalAttachmentMetadataForItem(handle); 1154 local_metadata = entry_factory()->GetLocalAttachmentMetadataForItem(handle);
1155 EXPECT_EQ(server_metadata.SerializeAsString(), 1155 EXPECT_EQ(server_metadata.SerializeAsString(),
1156 local_metadata.SerializeAsString()); 1156 local_metadata.SerializeAsString());
1157 } 1157 }
1158 1158
1159 } // namespace syncer 1159 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/api/mock_model_type_store.cc ('k') | sync/engine/model_type_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698