| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 void(sync_api::PassphraseRequiredReason, | 43 void(sync_api::PassphraseRequiredReason, |
| 44 const sync_pb::EncryptedData&)); | 44 const sync_pb::EncryptedData&)); |
| 45 MOCK_METHOD0(OnPassphraseAccepted, void()); | 45 MOCK_METHOD0(OnPassphraseAccepted, void()); |
| 46 MOCK_METHOD2(OnEncryptedTypesChanged, | 46 MOCK_METHOD2(OnEncryptedTypesChanged, |
| 47 void(syncable::ModelTypeSet, bool)); | 47 void(syncable::ModelTypeSet, bool)); |
| 48 MOCK_METHOD0(OnEncryptionComplete, void()); | 48 MOCK_METHOD0(OnEncryptionComplete, void()); |
| 49 MOCK_METHOD1(OnMigrationNeededForTypes, void(syncable::ModelTypeSet)); | 49 MOCK_METHOD1(OnMigrationNeededForTypes, void(syncable::ModelTypeSet)); |
| 50 MOCK_METHOD1(OnDataTypesChanged, void(syncable::ModelTypeSet)); | 50 MOCK_METHOD1(OnDataTypesChanged, void(syncable::ModelTypeSet)); |
| 51 MOCK_METHOD1(OnActionableError, | 51 MOCK_METHOD1(OnActionableError, |
| 52 void(const browser_sync::SyncProtocolError& sync_error)); | 52 void(const browser_sync::SyncProtocolError& sync_error)); |
| 53 MOCK_METHOD0(OnSyncConfigureRetry, void()); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace | 56 } // namespace |
| 56 | 57 |
| 57 class SyncBackendHostTest : public testing::Test { | 58 class SyncBackendHostTest : public testing::Test { |
| 58 protected: | 59 protected: |
| 59 SyncBackendHostTest() | 60 SyncBackendHostTest() |
| 60 : ui_thread_(BrowserThread::UI, &ui_loop_), | 61 : ui_thread_(BrowserThread::UI, &ui_loop_), |
| 61 io_thread_(BrowserThread::IO) {} | 62 io_thread_(BrowserThread::IO) {} |
| 62 | 63 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 credentials, | 107 credentials, |
| 107 true, | 108 true, |
| 108 &handler_mock); | 109 &handler_mock); |
| 109 backend.StopSyncingForShutdown(); | 110 backend.StopSyncingForShutdown(); |
| 110 backend.Shutdown(false); | 111 backend.Shutdown(false); |
| 111 } | 112 } |
| 112 | 113 |
| 113 // TODO(akalin): Write more SyncBackendHost unit tests. | 114 // TODO(akalin): Write more SyncBackendHost unit tests. |
| 114 | 115 |
| 115 } // namespace browser_sync | 116 } // namespace browser_sync |
| OLD | NEW |