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

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

Issue 1907683003: Convert //components/sync_driver from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix, address feedback Created 4 years, 8 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> 7 #include <utility>
8 8
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "components/sync_driver/generic_change_processor.h" 10 #include "components/sync_driver/generic_change_processor.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 generic_change_processor_ = 76 generic_change_processor_ =
77 processor_factory->CreateGenericChangeProcessor(type, 77 processor_factory->CreateGenericChangeProcessor(type,
78 user_share, 78 user_share,
79 error_handler, 79 error_handler,
80 local_service, 80 local_service,
81 merge_result, 81 merge_result,
82 sync_client).release(); 82 sync_client).release();
83 // If available, propagate attachment service to the syncable service. 83 // If available, propagate attachment service to the syncable service.
84 scoped_ptr<syncer::AttachmentService> attachment_service = 84 std::unique_ptr<syncer::AttachmentService> attachment_service =
85 generic_change_processor_->GetAttachmentService(); 85 generic_change_processor_->GetAttachmentService();
86 if (attachment_service) { 86 if (attachment_service) {
87 local_service->SetAttachmentService(std::move(attachment_service)); 87 local_service->SetAttachmentService(std::move(attachment_service));
88 } 88 }
89 return local_service; 89 return local_service;
90 } 90 }
91 91
92 bool SharedChangeProcessor::Disconnect() { 92 bool SharedChangeProcessor::Disconnect() {
93 // May be called from any thread. 93 // May be called from any thread.
94 DVLOG(1) << "Disconnecting change processor."; 94 DVLOG(1) << "Disconnecting change processor.";
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return error_handler_->CreateAndUploadError(location, message, type_); 215 return error_handler_->CreateAndUploadError(location, message, type_);
216 } else { 216 } else {
217 return syncer::SyncError(location, 217 return syncer::SyncError(location,
218 syncer::SyncError::DATATYPE_ERROR, 218 syncer::SyncError::DATATYPE_ERROR,
219 message, 219 message,
220 type_); 220 type_);
221 } 221 }
222 } 222 }
223 223
224 } // namespace sync_driver 224 } // namespace sync_driver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698