| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 MOCK_METHOD1(OnExperimentsChanged, | 102 MOCK_METHOD1(OnExperimentsChanged, |
| 103 void(const syncer::Experiments&)); | 103 void(const syncer::Experiments&)); |
| 104 MOCK_METHOD1(OnActionableError, | 104 MOCK_METHOD1(OnActionableError, |
| 105 void(const syncer::SyncProtocolError& sync_error)); | 105 void(const syncer::SyncProtocolError& sync_error)); |
| 106 MOCK_METHOD0(OnSyncConfigureRetry, void()); | 106 MOCK_METHOD0(OnSyncConfigureRetry, void()); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 class FakeSyncManagerFactory : public syncer::SyncManagerFactory { | 109 class FakeSyncManagerFactory : public syncer::SyncManagerFactory { |
| 110 public: | 110 public: |
| 111 explicit FakeSyncManagerFactory(FakeSyncManager** fake_manager) | 111 explicit FakeSyncManagerFactory(FakeSyncManager** fake_manager) |
| 112 : fake_manager_(fake_manager) { | 112 : SyncManagerFactory(NORMAL), |
| 113 fake_manager_(fake_manager) { |
| 113 *fake_manager_ = NULL; | 114 *fake_manager_ = NULL; |
| 114 } | 115 } |
| 115 virtual ~FakeSyncManagerFactory() {} | 116 virtual ~FakeSyncManagerFactory() {} |
| 116 | 117 |
| 117 // SyncManagerFactory implementation. Called on the sync thread. | 118 // SyncManagerFactory implementation. Called on the sync thread. |
| 118 virtual scoped_ptr<SyncManager> CreateSyncManager( | 119 virtual scoped_ptr<SyncManager> CreateSyncManager( |
| 119 std::string name) OVERRIDE { | 120 std::string name) OVERRIDE { |
| 120 *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, | 121 *fake_manager_ = new FakeSyncManager(initial_sync_ended_types_, |
| 121 progress_marker_types_, | 122 progress_marker_types_, |
| 122 configure_fail_types_); | 123 configure_fail_types_); |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 ASSERT_NE(-1, base::WriteFile(sync_file, nonsense, strlen(nonsense))); | 723 ASSERT_NE(-1, base::WriteFile(sync_file, nonsense, strlen(nonsense))); |
| 723 | 724 |
| 724 InitializeBackend(true); | 725 InitializeBackend(true); |
| 725 | 726 |
| 726 EXPECT_FALSE(base::PathExists(sync_file)); | 727 EXPECT_FALSE(base::PathExists(sync_file)); |
| 727 } | 728 } |
| 728 | 729 |
| 729 } // namespace | 730 } // namespace |
| 730 | 731 |
| 731 } // namespace browser_sync | 732 } // namespace browser_sync |
| OLD | NEW |