| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_PROXY_H_ | |
| 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_PROXY_H_ | |
| 7 | |
| 8 #include "base/memory/weak_ptr.h" | |
| 9 #include "sync/internal_api/public/base/model_type.h" | |
| 10 | |
| 11 namespace syncer { | |
| 12 | |
| 13 class NonBlockingTypeProcessor; | |
| 14 struct DataTypeState; | |
| 15 | |
| 16 // Interface for the datatype integration logic from non-sync threads. | |
| 17 // | |
| 18 // See SyncCoreProxyImpl for an actual implementation. | |
| 19 class SYNC_EXPORT_PRIVATE SyncCoreProxy { | |
| 20 public: | |
| 21 SyncCoreProxy(); | |
| 22 virtual ~SyncCoreProxy(); | |
| 23 | |
| 24 // Attempts to connect a non-blocking type to the sync core. | |
| 25 // | |
| 26 // Must be called from the thread where the data type lives. | |
| 27 virtual void ConnectTypeToCore( | |
| 28 syncer::ModelType type, | |
| 29 const DataTypeState& data_type_state, | |
| 30 base::WeakPtr<NonBlockingTypeProcessor> type_processor) = 0; | |
| 31 | |
| 32 // Tells the syncer that we're no longer interested in syncing this type. | |
| 33 // | |
| 34 // Once this takes effect, the syncer can assume that it will no longer | |
| 35 // receive commit requests for this type. It should also stop requesting | |
| 36 // and applying updates for this type, too. | |
| 37 virtual void Disconnect(syncer::ModelType type) = 0; | |
| 38 | |
| 39 // Creates a clone of this SyncCoreProxy. | |
| 40 virtual scoped_ptr<SyncCoreProxy> Clone() const = 0; | |
| 41 }; | |
| 42 | |
| 43 } // namespace syncer | |
| 44 | |
| 45 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_PROXY_H_ | |
| OLD | NEW |