| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 virtual ~MockSyncFrontend() {} | 30 virtual ~MockSyncFrontend() {} |
| 31 | 31 |
| 32 MOCK_METHOD2(OnBackendInitialized, void(const WeakHandle<JsBackend>&, bool)); | 32 MOCK_METHOD2(OnBackendInitialized, void(const WeakHandle<JsBackend>&, bool)); |
| 33 MOCK_METHOD0(OnSyncCycleCompleted, void()); | 33 MOCK_METHOD0(OnSyncCycleCompleted, void()); |
| 34 MOCK_METHOD0(OnAuthError, void()); | 34 MOCK_METHOD0(OnAuthError, void()); |
| 35 MOCK_METHOD0(OnStopSyncingPermanently, void()); | 35 MOCK_METHOD0(OnStopSyncingPermanently, void()); |
| 36 MOCK_METHOD0(OnClearServerDataSucceeded, void()); | 36 MOCK_METHOD0(OnClearServerDataSucceeded, void()); |
| 37 MOCK_METHOD0(OnClearServerDataFailed, void()); | 37 MOCK_METHOD0(OnClearServerDataFailed, void()); |
| 38 MOCK_METHOD1(OnPassphraseRequired, void(sync_api::PassphraseRequiredReason)); | 38 MOCK_METHOD1(OnPassphraseRequired, void(sync_api::PassphraseRequiredReason)); |
| 39 MOCK_METHOD0(OnPassphraseAccepted, void()); | 39 MOCK_METHOD0(OnPassphraseAccepted, void()); |
| 40 MOCK_METHOD1(OnEncryptionComplete, void(const syncable::ModelTypeSet&)); | 40 MOCK_METHOD2(OnEncryptionComplete, |
| 41 void(const syncable::ModelTypeSet&, bool)); |
| 41 MOCK_METHOD1(OnMigrationNeededForTypes, void(const syncable::ModelTypeSet&)); | 42 MOCK_METHOD1(OnMigrationNeededForTypes, void(const syncable::ModelTypeSet&)); |
| 42 MOCK_METHOD1(OnDataTypesChanged, void(const syncable::ModelTypeSet&)); | 43 MOCK_METHOD1(OnDataTypesChanged, void(const syncable::ModelTypeSet&)); |
| 43 MOCK_METHOD1(OnActionableError, | 44 MOCK_METHOD1(OnActionableError, |
| 44 void(const browser_sync::SyncProtocolError& sync_error)); | 45 void(const browser_sync::SyncProtocolError& sync_error)); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace | 48 } // namespace |
| 48 | 49 |
| 49 class SyncBackendHostTest : public testing::Test { | 50 class SyncBackendHostTest : public testing::Test { |
| 50 protected: | 51 protected: |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 syncable::ModelTypeSet(), | 99 syncable::ModelTypeSet(), |
| 99 credentials, | 100 credentials, |
| 100 true); | 101 true); |
| 101 backend.StopSyncingForShutdown(); | 102 backend.StopSyncingForShutdown(); |
| 102 backend.Shutdown(false); | 103 backend.Shutdown(false); |
| 103 } | 104 } |
| 104 | 105 |
| 105 // TODO(akalin): Write more SyncBackendHost unit tests. | 106 // TODO(akalin): Write more SyncBackendHost unit tests. |
| 106 | 107 |
| 107 } // namespace browser_sync | 108 } // namespace browser_sync |
| OLD | NEW |