| 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/fake_generic_change_processor.h" | 5 #include "chrome/browser/sync/glue/fake_generic_change_processor.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "sync/api/attachments/fake_attachment_service.h" |
| 9 #include "sync/api/syncable_service.h" | 10 #include "sync/api/syncable_service.h" |
| 10 | 11 |
| 11 namespace browser_sync { | 12 namespace browser_sync { |
| 12 | 13 |
| 13 FakeGenericChangeProcessor::FakeGenericChangeProcessor() | 14 FakeGenericChangeProcessor::FakeGenericChangeProcessor() |
| 14 : GenericChangeProcessor( | 15 : GenericChangeProcessor(NULL, |
| 15 NULL, | 16 base::WeakPtr<syncer::SyncableService>(), |
| 16 base::WeakPtr<syncer::SyncableService>(), | 17 base::WeakPtr<syncer::SyncMergeResult>(), |
| 17 base::WeakPtr<syncer::SyncMergeResult>(), | 18 NULL, |
| 18 NULL), | 19 syncer::FakeAttachmentService::CreateForTest()), |
| 19 sync_model_has_user_created_nodes_(true), | 20 sync_model_has_user_created_nodes_(true), |
| 20 sync_model_has_user_created_nodes_success_(true), | 21 sync_model_has_user_created_nodes_success_(true), |
| 21 crypto_ready_if_necessary_(true) {} | 22 crypto_ready_if_necessary_(true) {} |
| 22 | 23 |
| 23 FakeGenericChangeProcessor::~FakeGenericChangeProcessor() {} | 24 FakeGenericChangeProcessor::~FakeGenericChangeProcessor() {} |
| 24 | 25 |
| 25 void FakeGenericChangeProcessor::set_process_sync_changes_error( | 26 void FakeGenericChangeProcessor::set_process_sync_changes_error( |
| 26 const syncer::SyncError& error) { | 27 const syncer::SyncError& error) { |
| 27 process_sync_changes_error_ = error; | 28 process_sync_changes_error_ = error; |
| 28 } | 29 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 *has_nodes = sync_model_has_user_created_nodes_; | 64 *has_nodes = sync_model_has_user_created_nodes_; |
| 64 return sync_model_has_user_created_nodes_success_; | 65 return sync_model_has_user_created_nodes_success_; |
| 65 } | 66 } |
| 66 | 67 |
| 67 bool FakeGenericChangeProcessor::CryptoReadyIfNecessary( | 68 bool FakeGenericChangeProcessor::CryptoReadyIfNecessary( |
| 68 syncer::ModelType type) { | 69 syncer::ModelType type) { |
| 69 return crypto_ready_if_necessary_; | 70 return crypto_ready_if_necessary_; |
| 70 } | 71 } |
| 71 | 72 |
| 72 } // namespace browser_sync | 73 } // namespace browser_sync |
| OLD | NEW |