| 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/generic_change_processor.h" | 5 #include "components/sync_driver/generic_change_processor.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/sync_driver/sync_api_component_factory.h" | 10 #include "components/sync_driver/sync_api_component_factory.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 attachment_service_proxy); | 85 attachment_service_proxy); |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace | 88 } // namespace |
| 89 | 89 |
| 90 GenericChangeProcessor::GenericChangeProcessor( | 90 GenericChangeProcessor::GenericChangeProcessor( |
| 91 DataTypeErrorHandler* error_handler, | 91 DataTypeErrorHandler* error_handler, |
| 92 const base::WeakPtr<syncer::SyncableService>& local_service, | 92 const base::WeakPtr<syncer::SyncableService>& local_service, |
| 93 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, | 93 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, |
| 94 syncer::UserShare* user_share, | 94 syncer::UserShare* user_share, |
| 95 SyncApiComponentFactory* sync_factory) | 95 SyncApiComponentFactory* sync_factory, |
| 96 const scoped_refptr<syncer::AttachmentStore>& attachment_store) |
| 96 : ChangeProcessor(error_handler), | 97 : ChangeProcessor(error_handler), |
| 97 local_service_(local_service), | 98 local_service_(local_service), |
| 98 merge_result_(merge_result), | 99 merge_result_(merge_result), |
| 99 share_handle_(user_share), | 100 share_handle_(user_share), |
| 100 attachment_service_( | 101 attachment_service_( |
| 101 sync_factory->CreateAttachmentService(*user_share, this)), | 102 sync_factory->CreateAttachmentService(attachment_store, |
| 103 *user_share, |
| 104 this)), |
| 102 attachment_service_weak_ptr_factory_(attachment_service_.get()), | 105 attachment_service_weak_ptr_factory_(attachment_service_.get()), |
| 103 attachment_service_proxy_( | 106 attachment_service_proxy_( |
| 104 base::MessageLoopProxy::current(), | 107 base::MessageLoopProxy::current(), |
| 105 attachment_service_weak_ptr_factory_.GetWeakPtr()) { | 108 attachment_service_weak_ptr_factory_.GetWeakPtr()) { |
| 106 DCHECK(CalledOnValidThread()); | 109 DCHECK(CalledOnValidThread()); |
| 107 DCHECK(attachment_service_); | 110 DCHECK(attachment_service_); |
| 108 } | 111 } |
| 109 | 112 |
| 110 GenericChangeProcessor::~GenericChangeProcessor() { | 113 GenericChangeProcessor::~GenericChangeProcessor() { |
| 111 DCHECK(CalledOnValidThread()); | 114 DCHECK(CalledOnValidThread()); |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 | 708 |
| 706 void GenericChangeProcessor::StartImpl() { | 709 void GenericChangeProcessor::StartImpl() { |
| 707 } | 710 } |
| 708 | 711 |
| 709 syncer::UserShare* GenericChangeProcessor::share_handle() const { | 712 syncer::UserShare* GenericChangeProcessor::share_handle() const { |
| 710 DCHECK(CalledOnValidThread()); | 713 DCHECK(CalledOnValidThread()); |
| 711 return share_handle_; | 714 return share_handle_; |
| 712 } | 715 } |
| 713 | 716 |
| 714 } // namespace sync_driver | 717 } // namespace sync_driver |
| OLD | NEW |