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

Side by Side Diff: components/sync_driver/shared_change_processor.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers 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
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 "components/sync_driver/shared_change_processor.h" 5 #include "components/sync_driver/shared_change_processor.h"
6 6
7 #include <utility>
8
7 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
8 #include "components/sync_driver/generic_change_processor.h" 10 #include "components/sync_driver/generic_change_processor.h"
9 #include "components/sync_driver/generic_change_processor_factory.h" 11 #include "components/sync_driver/generic_change_processor_factory.h"
10 #include "components/sync_driver/sync_client.h" 12 #include "components/sync_driver/sync_client.h"
11 #include "sync/api/sync_change.h" 13 #include "sync/api/sync_change.h"
12 #include "sync/api/syncable_service.h" 14 #include "sync/api/syncable_service.h"
13 15
14 using base::AutoLock; 16 using base::AutoLock;
15 17
16 namespace syncer { 18 namespace syncer {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 processor_factory->CreateGenericChangeProcessor(type, 77 processor_factory->CreateGenericChangeProcessor(type,
76 user_share, 78 user_share,
77 error_handler, 79 error_handler,
78 local_service, 80 local_service,
79 merge_result, 81 merge_result,
80 sync_client).release(); 82 sync_client).release();
81 // If available, propagate attachment service to the syncable service. 83 // If available, propagate attachment service to the syncable service.
82 scoped_ptr<syncer::AttachmentService> attachment_service = 84 scoped_ptr<syncer::AttachmentService> attachment_service =
83 generic_change_processor_->GetAttachmentService(); 85 generic_change_processor_->GetAttachmentService();
84 if (attachment_service) { 86 if (attachment_service) {
85 local_service->SetAttachmentService(attachment_service.Pass()); 87 local_service->SetAttachmentService(std::move(attachment_service));
86 } 88 }
87 return local_service; 89 return local_service;
88 } 90 }
89 91
90 bool SharedChangeProcessor::Disconnect() { 92 bool SharedChangeProcessor::Disconnect() {
91 // May be called from any thread. 93 // May be called from any thread.
92 DVLOG(1) << "Disconnecting change processor."; 94 DVLOG(1) << "Disconnecting change processor.";
93 AutoLock lock(monitor_lock_); 95 AutoLock lock(monitor_lock_);
94 bool was_connected = !disconnected_; 96 bool was_connected = !disconnected_;
95 disconnected_ = true; 97 disconnected_ = true;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return error_handler_->CreateAndUploadError(location, message, type_); 215 return error_handler_->CreateAndUploadError(location, message, type_);
214 } else { 216 } else {
215 return syncer::SyncError(location, 217 return syncer::SyncError(location,
216 syncer::SyncError::DATATYPE_ERROR, 218 syncer::SyncError::DATATYPE_ERROR,
217 message, 219 message,
218 type_); 220 type_);
219 } 221 }
220 } 222 }
221 223
222 } // namespace sync_driver 224 } // namespace sync_driver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698