Add ICU message format support
[chromium-blink-merge.git] / sync / internal_api / public / sync_context_proxy.h
blob94c7bc379e69f8bdd90c3d29691cd6b2ba535a0a
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.
5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_PROXY_H_
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_PROXY_H_
8 #include "base/memory/weak_ptr.h"
9 #include "sync/internal_api/public/base/model_type.h"
10 #include "sync/internal_api/public/non_blocking_sync_common.h"
12 namespace syncer {
13 class ModelTypeSyncProxyImpl;
16 namespace syncer_v2 {
18 // Interface for the datatype integration logic from non-sync threads.
20 // See SyncContextProxyImpl for an actual implementation.
21 class SYNC_EXPORT_PRIVATE SyncContextProxy {
22 public:
23 SyncContextProxy();
24 virtual ~SyncContextProxy();
26 // Attempts to connect a non-blocking type to the sync context.
28 // Must be called from the thread where the data type lives.
29 virtual void ConnectTypeToSync(
30 syncer::ModelType type,
31 const DataTypeState& data_type_state,
32 const UpdateResponseDataList& saved_pending_updates,
33 const base::WeakPtr<syncer::ModelTypeSyncProxyImpl>& type_sync_proxy) = 0;
35 // Tells the syncer that we're no longer interested in syncing this type.
37 // Once this takes effect, the syncer can assume that it will no longer
38 // receive commit requests for this type. It should also stop requesting
39 // and applying updates for this type, too.
40 virtual void Disconnect(syncer::ModelType type) = 0;
42 // Creates a clone of this SyncContextProxy.
43 virtual scoped_ptr<SyncContextProxy> Clone() const = 0;
46 } // namespace syncer
48 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_PROXY_H_