| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/sync_backend_host_impl.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 MOCK_METHOD0(OnSyncConfigureRetry, void()); | 108 MOCK_METHOD0(OnSyncConfigureRetry, void()); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 class FakeSyncManagerFactory : public syncer::SyncManagerFactory { | 111 class FakeSyncManagerFactory : public syncer::SyncManagerFactory { |
| 112 public: | 112 public: |
| 113 explicit FakeSyncManagerFactory(FakeSyncManager** fake_manager) | 113 explicit FakeSyncManagerFactory(FakeSyncManager** fake_manager) |
| 114 : SyncManagerFactory(NORMAL), | 114 : SyncManagerFactory(NORMAL), |
| 115 fake_manager_(fake_manager) { | 115 fake_manager_(fake_manager) { |
| 116 *fake_manager_ = NULL; | 116 *fake_manager_ = NULL; |
| 117 } | 117 } |
| 118 virtual ~FakeSyncManagerFactory() {} | 118 ~FakeSyncManagerFactory() override {} |
| 119 | 119 |
| 120 // SyncManagerFactory implementation. Called on the sync thread. | 120 // SyncManagerFactory implementation. Called on the sync thread. |
| 121 virtual scoped_ptr<SyncManager> CreateSyncManager( | 121 scoped_ptr<SyncManager> CreateSyncManager(std::string name) override { |
| 122 std::string name) override { | |
| 123 *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, | 122 *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, |
| 124 progress_marker_types_, | 123 progress_marker_types_, |
| 125 configure_fail_types_); | 124 configure_fail_types_); |
| 126 return scoped_ptr<SyncManager>(*fake_manager_); | 125 return scoped_ptr<SyncManager>(*fake_manager_); |
| 127 } | 126 } |
| 128 | 127 |
| 129 void set_initial_sync_ended_types(syncer::ModelTypeSet types) { | 128 void set_initial_sync_ended_types(syncer::ModelTypeSet types) { |
| 130 initial_sync_ended_types_ = types; | 129 initial_sync_ended_types_ = types; |
| 131 } | 130 } |
| 132 | 131 |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 Difference(syncer::ModelTypeSet::All(), | 766 Difference(syncer::ModelTypeSet::All(), |
| 768 enabled_types_), | 767 enabled_types_), |
| 769 syncer::ModelTypeSet()); | 768 syncer::ModelTypeSet()); |
| 770 EXPECT_FALSE(fake_manager_->GetTypesWithEmptyProgressMarkerToken( | 769 EXPECT_FALSE(fake_manager_->GetTypesWithEmptyProgressMarkerToken( |
| 771 error_types).Empty()); | 770 error_types).Empty()); |
| 772 } | 771 } |
| 773 | 772 |
| 774 } // namespace | 773 } // namespace |
| 775 | 774 |
| 776 } // namespace browser_sync | 775 } // namespace browser_sync |
| OLD | NEW |