| 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 #ifndef SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // Returns the types that have most recently received a refresh request. | 57 // Returns the types that have most recently received a refresh request. |
| 58 ModelTypeSet GetLastRefreshRequestTypes(); | 58 ModelTypeSet GetLastRefreshRequestTypes(); |
| 59 | 59 |
| 60 // Returns the most recent configuration reason since the last call to | 60 // Returns the most recent configuration reason since the last call to |
| 61 // GetAndResetConfigureReason, or since startup if never called. | 61 // GetAndResetConfigureReason, or since startup if never called. |
| 62 ConfigureReason GetAndResetConfigureReason(); | 62 ConfigureReason GetAndResetConfigureReason(); |
| 63 | 63 |
| 64 // Posts a method to invalidate the given IDs on the sync thread. | 64 // Posts a method to invalidate the given IDs on the sync thread. |
| 65 virtual void OnIncomingInvalidation( | 65 virtual void OnIncomingInvalidation( |
| 66 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 66 syncer::ModelType type, |
| 67 scoped_ptr<InvalidationInterface> interface) OVERRIDE; |
| 67 | 68 |
| 68 // Posts a method to update the invalidator state on the sync thread. | 69 // Posts a method to update the invalidator state on the sync thread. |
| 69 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; | 70 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; |
| 70 | 71 |
| 71 // Returns this class name for logging purposes. | |
| 72 virtual std::string GetOwnerName() const OVERRIDE; | |
| 73 | |
| 74 // Block until the sync thread has finished processing any pending messages. | 72 // Block until the sync thread has finished processing any pending messages. |
| 75 void WaitForSyncThread(); | 73 void WaitForSyncThread(); |
| 76 | 74 |
| 77 // SyncManager implementation. | 75 // SyncManager implementation. |
| 78 // Note: we treat whatever message loop this is called from as the sync | 76 // Note: we treat whatever message loop this is called from as the sync |
| 79 // loop for purposes of callbacks. | 77 // loop for purposes of callbacks. |
| 80 virtual void Init( | 78 virtual void Init( |
| 81 const base::FilePath& database_location, | 79 const base::FilePath& database_location, |
| 82 const WeakHandle<JsEventHandler>& event_handler, | 80 const WeakHandle<JsEventHandler>& event_handler, |
| 83 const std::string& sync_server_and_path, | 81 const std::string& sync_server_and_path, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 TestUserShare test_user_share_; | 165 TestUserShare test_user_share_; |
| 168 | 166 |
| 169 NullSyncCoreProxy null_sync_core_proxy_; | 167 NullSyncCoreProxy null_sync_core_proxy_; |
| 170 | 168 |
| 171 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); | 169 DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); |
| 172 }; | 170 }; |
| 173 | 171 |
| 174 } // namespace syncer | 172 } // namespace syncer |
| 175 | 173 |
| 176 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ | 174 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_SYNC_MANAGER_H_ |
| OLD | NEW |