| 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/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 MOCK_METHOD1(OnExperimentsChanged, | 90 MOCK_METHOD1(OnExperimentsChanged, |
| 91 void(const syncer::Experiments&)); | 91 void(const syncer::Experiments&)); |
| 92 MOCK_METHOD1(OnActionableError, | 92 MOCK_METHOD1(OnActionableError, |
| 93 void(const syncer::SyncProtocolError& sync_error)); | 93 void(const syncer::SyncProtocolError& sync_error)); |
| 94 MOCK_METHOD0(OnSyncConfigureRetry, void()); | 94 MOCK_METHOD0(OnSyncConfigureRetry, void()); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 class FakeSyncManagerFactory : public syncer::SyncManagerFactory { | 97 class FakeSyncManagerFactory : public syncer::SyncManagerFactory { |
| 98 public: | 98 public: |
| 99 explicit FakeSyncManagerFactory(FakeSyncManager** fake_manager) | 99 explicit FakeSyncManagerFactory(FakeSyncManager** fake_manager) |
| 100 : fake_manager_(fake_manager) { | 100 : SyncManagerFactory(NORMAL), |
| 101 fake_manager_(fake_manager) { |
| 101 *fake_manager_ = NULL; | 102 *fake_manager_ = NULL; |
| 102 } | 103 } |
| 103 virtual ~FakeSyncManagerFactory() {} | 104 virtual ~FakeSyncManagerFactory() {} |
| 104 | 105 |
| 105 // SyncManagerFactory implementation. Called on the sync thread. | 106 // SyncManagerFactory implementation. Called on the sync thread. |
| 106 virtual scoped_ptr<SyncManager> CreateSyncManager( | 107 virtual scoped_ptr<SyncManager> CreateSyncManager( |
| 107 std::string name) OVERRIDE { | 108 std::string name) OVERRIDE { |
| 108 *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, | 109 *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, |
| 109 progress_marker_types_, | 110 progress_marker_types_, |
| 110 configure_fail_types_); | 111 configure_fail_types_); |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 ASSERT_NE(-1, base::WriteFile(sync_file, nonsense, strlen(nonsense))); | 710 ASSERT_NE(-1, base::WriteFile(sync_file, nonsense, strlen(nonsense))); |
| 710 | 711 |
| 711 InitializeBackend(true); | 712 InitializeBackend(true); |
| 712 | 713 |
| 713 EXPECT_FALSE(base::PathExists(sync_file)); | 714 EXPECT_FALSE(base::PathExists(sync_file)); |
| 714 } | 715 } |
| 715 | 716 |
| 716 } // namespace | 717 } // namespace |
| 717 | 718 |
| 718 } // namespace browser_sync | 719 } // namespace browser_sync |
| OLD | NEW |