| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/sync/glue/change_processor.h" | 5 #include "chrome/browser/sync/glue/change_processor.h" |
| 6 #include "chrome/browser/profiles/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
| 7 | 7 |
| 8 namespace browser_sync { | 8 namespace browser_sync { |
| 9 | 9 |
| 10 ChangeProcessor::ChangeProcessor(DataTypeErrorHandler* error_handler) | 10 ChangeProcessor::ChangeProcessor(DataTypeErrorHandler* error_handler) |
| 11 : error_handler_(error_handler), | 11 : error_handler_(error_handler), |
| 12 share_handle_(NULL) {} | 12 share_handle_(NULL) {} |
| 13 | 13 |
| 14 ChangeProcessor::~ChangeProcessor() { | 14 ChangeProcessor::~ChangeProcessor() { |
| 15 } | 15 } |
| 16 | 16 |
| 17 void ChangeProcessor::Start(Profile* profile, | 17 void ChangeProcessor::Start(Profile* profile, |
| 18 syncer::UserShare* share_handle) { | 18 syncer::UserShare* share_handle) { |
| 19 DCHECK(error_handler_ && !share_handle_); | 19 DCHECK(!share_handle_); |
| 20 share_handle_ = share_handle; | 20 share_handle_ = share_handle; |
| 21 StartImpl(profile); | 21 StartImpl(profile); |
| 22 } | 22 } |
| 23 | 23 |
| 24 // Not implemented by default. | 24 // Not implemented by default. |
| 25 void ChangeProcessor::CommitChangesFromSyncModel() {} | 25 void ChangeProcessor::CommitChangesFromSyncModel() {} |
| 26 | 26 |
| 27 DataTypeErrorHandler* ChangeProcessor::error_handler() const { | 27 DataTypeErrorHandler* ChangeProcessor::error_handler() const { |
| 28 return error_handler_; | 28 return error_handler_; |
| 29 } | 29 } |
| 30 | 30 |
| 31 syncer::UserShare* ChangeProcessor::share_handle() const { | 31 syncer::UserShare* ChangeProcessor::share_handle() const { |
| 32 return share_handle_; | 32 return share_handle_; |
| 33 } | 33 } |
| 34 | 34 |
| 35 } // namespace browser_sync | 35 } // namespace browser_sync |
| OLD | NEW |