| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SYNC_CONTEXT_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 syncer::ModelType type, | 35 syncer::ModelType type, |
| 36 const DataTypeState& data_type_state, | 36 const DataTypeState& data_type_state, |
| 37 const UpdateResponseDataList& saved_pending_updates, | 37 const UpdateResponseDataList& saved_pending_updates, |
| 38 const scoped_refptr<base::SequencedTaskRunner>& datatype_task_runner, | 38 const scoped_refptr<base::SequencedTaskRunner>& datatype_task_runner, |
| 39 const base::WeakPtr<ModelTypeSyncProxyImpl>& type_sync_proxy) = 0; | 39 const base::WeakPtr<ModelTypeSyncProxyImpl>& type_sync_proxy) = 0; |
| 40 | 40 |
| 41 // Disconnects the syncer from the model and stops syncing the type. | 41 // Disconnects the syncer from the model and stops syncing the type. |
| 42 // | 42 // |
| 43 // By the time this is called, the model thread should have already | 43 // By the time this is called, the model thread should have already |
| 44 // invalidated the WeakPtr it sent to us in the connect request. Any | 44 // invalidated the WeakPtr it sent to us in the connect request. Any |
| 45 // messages sent to that ModelTypeSyncProxy will not be recived. | 45 // messages sent to that ModelTypeProcessor will not be recived. |
| 46 // | 46 // |
| 47 // This is the sync thread's chance to clear state associated with the type. | 47 // This is the sync thread's chance to clear state associated with the type. |
| 48 // It also causes the syncer to stop requesting updates for this type, and to | 48 // It also causes the syncer to stop requesting updates for this type, and to |
| 49 // abort any in-progress commit requests. | 49 // abort any in-progress commit requests. |
| 50 virtual void DisconnectSyncWorker(syncer::ModelType type) = 0; | 50 virtual void DisconnectSyncWorker(syncer::ModelType type) = 0; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace syncer | 53 } // namespace syncer |
| 54 | 54 |
| 55 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_H_ | 55 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_H_ |
| OLD | NEW |