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

Side by Side Diff: components/dom_distiller/core/dom_distiller_store.cc

Issue 2521063004: Replace ptr.reset with std::move in src/components (Closed)
Patch Set: Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/dom_distiller/core/dom_distiller_store.h" 5 #include "components/dom_distiller/core/dom_distiller_store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 // syncer::SyncableService implementation. 281 // syncer::SyncableService implementation.
282 SyncMergeResult DomDistillerStore::MergeDataAndStartSyncing( 282 SyncMergeResult DomDistillerStore::MergeDataAndStartSyncing(
283 ModelType type, 283 ModelType type,
284 const SyncDataList& initial_sync_data, 284 const SyncDataList& initial_sync_data,
285 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor, 285 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor,
286 std::unique_ptr<syncer::SyncErrorFactory> error_handler) { 286 std::unique_ptr<syncer::SyncErrorFactory> error_handler) {
287 DCHECK_EQ(syncer::ARTICLES, type); 287 DCHECK_EQ(syncer::ARTICLES, type);
288 DCHECK(!sync_processor_); 288 DCHECK(!sync_processor_);
289 DCHECK(!error_factory_); 289 DCHECK(!error_factory_);
290 sync_processor_.reset(sync_processor.release()); 290 sync_processor_ = std::move(sync_processor);
291 error_factory_.reset(error_handler.release()); 291 error_factory_ = std::move(error_handler);
292 292
293 SyncChangeList database_changes; 293 SyncChangeList database_changes;
294 SyncChangeList sync_changes; 294 SyncChangeList sync_changes;
295 SyncMergeResult result = 295 SyncMergeResult result =
296 MergeDataWithModel(initial_sync_data, &database_changes, &sync_changes); 296 MergeDataWithModel(initial_sync_data, &database_changes, &sync_changes);
297 ApplyChangesToDatabase(database_changes); 297 ApplyChangesToDatabase(database_changes);
298 ApplyChangesToSync(FROM_HERE, sync_changes); 298 ApplyChangesToSync(FROM_HERE, sync_changes);
299 299
300 return result; 300 return result;
301 } 301 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 result.set_num_items_deleted(0); 485 result.set_num_items_deleted(0);
486 486
487 result.set_pre_association_version(0); 487 result.set_pre_association_version(0);
488 result.set_num_items_after_association(model_.GetNumEntries()); 488 result.set_num_items_after_association(model_.GetNumEntries());
489 result.set_error(error); 489 result.set_error(error);
490 490
491 return result; 491 return result;
492 } 492 }
493 493
494 } // namespace dom_distiller 494 } // namespace dom_distiller
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698