| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 class FakeSyncManagerFactory : public syncer::SyncManagerFactory { | 116 class FakeSyncManagerFactory : public syncer::SyncManagerFactory { |
| 117 public: | 117 public: |
| 118 explicit FakeSyncManagerFactory(FakeSyncManager** fake_manager) | 118 explicit FakeSyncManagerFactory(FakeSyncManager** fake_manager) |
| 119 : SyncManagerFactory(NORMAL), | 119 : SyncManagerFactory(NORMAL), |
| 120 fake_manager_(fake_manager) { | 120 fake_manager_(fake_manager) { |
| 121 *fake_manager_ = NULL; | 121 *fake_manager_ = NULL; |
| 122 } | 122 } |
| 123 ~FakeSyncManagerFactory() override {} | 123 ~FakeSyncManagerFactory() override {} |
| 124 | 124 |
| 125 // SyncManagerFactory implementation. Called on the sync thread. | 125 // SyncManagerFactory implementation. Called on the sync thread. |
| 126 scoped_ptr<SyncManager> CreateSyncManager(std::string name) override { | 126 scoped_ptr<SyncManager> CreateSyncManager( |
| 127 const std::string& /* name */) override { |
| 127 *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, | 128 *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, |
| 128 progress_marker_types_, | 129 progress_marker_types_, |
| 129 configure_fail_types_); | 130 configure_fail_types_); |
| 130 return scoped_ptr<SyncManager>(*fake_manager_); | 131 return scoped_ptr<SyncManager>(*fake_manager_); |
| 131 } | 132 } |
| 132 | 133 |
| 133 void set_initial_sync_ended_types(syncer::ModelTypeSet types) { | 134 void set_initial_sync_ended_types(syncer::ModelTypeSet types) { |
| 134 initial_sync_ended_types_ = types; | 135 initial_sync_ended_types_ = types; |
| 135 } | 136 } |
| 136 | 137 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 EXPECT_EQ(invalidation_versions.size(), | 865 EXPECT_EQ(invalidation_versions.size(), |
| 865 persisted_invalidation_versions.size()); | 866 persisted_invalidation_versions.size()); |
| 866 for (auto iter : persisted_invalidation_versions) { | 867 for (auto iter : persisted_invalidation_versions) { |
| 867 EXPECT_EQ(invalidation_versions[iter.first], iter.second); | 868 EXPECT_EQ(invalidation_versions[iter.first], iter.second); |
| 868 } | 869 } |
| 869 } | 870 } |
| 870 | 871 |
| 871 } // namespace | 872 } // namespace |
| 872 | 873 |
| 873 } // namespace browser_sync | 874 } // namespace browser_sync |
| OLD | NEW |