OLD | NEW |
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/change_processor.h" | 5 #include "components/sync/driver/change_processor.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 namespace sync_driver { | 9 namespace syncer { |
10 | 10 |
11 ChangeProcessor::ChangeProcessor( | 11 ChangeProcessor::ChangeProcessor( |
12 std::unique_ptr<syncer::DataTypeErrorHandler> error_handler) | 12 std::unique_ptr<DataTypeErrorHandler> error_handler) |
13 : error_handler_(std::move(error_handler)), share_handle_(NULL) {} | 13 : error_handler_(std::move(error_handler)), share_handle_(NULL) {} |
14 | 14 |
15 ChangeProcessor::~ChangeProcessor() {} | 15 ChangeProcessor::~ChangeProcessor() {} |
16 | 16 |
17 void ChangeProcessor::Start(syncer::UserShare* share_handle) { | 17 void ChangeProcessor::Start(UserShare* share_handle) { |
18 DCHECK(!share_handle_); | 18 DCHECK(!share_handle_); |
19 share_handle_ = share_handle; | 19 share_handle_ = share_handle; |
20 StartImpl(); | 20 StartImpl(); |
21 } | 21 } |
22 | 22 |
23 // Not implemented by default. | 23 // Not implemented by default. |
24 void ChangeProcessor::CommitChangesFromSyncModel() {} | 24 void ChangeProcessor::CommitChangesFromSyncModel() {} |
25 | 25 |
26 syncer::DataTypeErrorHandler* ChangeProcessor::error_handler() const { | 26 DataTypeErrorHandler* ChangeProcessor::error_handler() const { |
27 return error_handler_.get(); | 27 return error_handler_.get(); |
28 } | 28 } |
29 | 29 |
30 syncer::UserShare* ChangeProcessor::share_handle() const { | 30 UserShare* ChangeProcessor::share_handle() const { |
31 return share_handle_; | 31 return share_handle_; |
32 } | 32 } |
33 | 33 |
34 } // namespace sync_driver | 34 } // namespace syncer |
OLD | NEW |