OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "components/sync_driver/glue/sync_backend_registrar.h" | 5 #include "components/sync_driver/glue/sync_backend_registrar.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 DCHECK(!GetProcessorUnsafe(type)); | 178 DCHECK(!GetProcessorUnsafe(type)); |
179 } | 179 } |
180 | 180 |
181 bool SyncBackendRegistrar::IsTypeActivatedForTest( | 181 bool SyncBackendRegistrar::IsTypeActivatedForTest( |
182 syncer::ModelType type) const { | 182 syncer::ModelType type) const { |
183 return GetProcessor(type) != NULL; | 183 return GetProcessor(type) != NULL; |
184 } | 184 } |
185 | 185 |
186 void SyncBackendRegistrar::OnChangesApplied( | 186 void SyncBackendRegistrar::OnChangesApplied( |
187 syncer::ModelType model_type, | 187 syncer::ModelType model_type, |
188 int64 model_version, | 188 int64_t model_version, |
189 const syncer::BaseTransaction* trans, | 189 const syncer::BaseTransaction* trans, |
190 const syncer::ImmutableChangeRecordList& changes) { | 190 const syncer::ImmutableChangeRecordList& changes) { |
191 sync_driver::ChangeProcessor* processor = GetProcessor(model_type); | 191 sync_driver::ChangeProcessor* processor = GetProcessor(model_type); |
192 if (!processor) | 192 if (!processor) |
193 return; | 193 return; |
194 | 194 |
195 processor->ApplyChangesFromSyncModel(trans, model_version, changes); | 195 processor->ApplyChangesFromSyncModel(trans, model_version, changes); |
196 } | 196 } |
197 | 197 |
198 void SyncBackendRegistrar::OnChangesComplete(syncer::ModelType model_type) { | 198 void SyncBackendRegistrar::OnChangesComplete(syncer::ModelType model_type) { |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 base::Bind(&SyncBackendRegistrar::OnWorkerUnregistrationDone, | 344 base::Bind(&SyncBackendRegistrar::OnWorkerUnregistrationDone, |
345 base::Unretained(this))); | 345 base::Unretained(this))); |
346 } | 346 } |
347 } | 347 } |
348 | 348 |
349 base::Thread* SyncBackendRegistrar::sync_thread() { | 349 base::Thread* SyncBackendRegistrar::sync_thread() { |
350 return sync_thread_.get(); | 350 return sync_thread_.get(); |
351 } | 351 } |
352 | 352 |
353 } // namespace browser_sync | 353 } // namespace browser_sync |
OLD | NEW |