Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: sync/internal_api/public/sync_core_proxy.h

Issue 272323002: sync: Implement disabling of non blocking types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_CORE_PROXY_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_PROXY_H_
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_PROXY_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_PROXY_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "sync/internal_api/public/base/model_type.h" 9 #include "sync/internal_api/public/base/model_type.h"
10 10
11 namespace syncer { 11 namespace syncer {
12 12
13 class NonBlockingTypeProcessor; 13 class NonBlockingTypeProcessor;
14 14
15 // Interface for the datatype integration logic from non-sync threads. 15 // Interface for the datatype integration logic from non-sync threads.
16 // 16 //
17 // See SyncCoreProxyImpl for an actual implementation. 17 // See SyncCoreProxyImpl for an actual implementation.
18 class SYNC_EXPORT_PRIVATE SyncCoreProxy { 18 class SYNC_EXPORT_PRIVATE SyncCoreProxy {
19 public: 19 public:
20 SyncCoreProxy(); 20 SyncCoreProxy();
21 virtual ~SyncCoreProxy(); 21 virtual ~SyncCoreProxy();
22 22
23 // Attempts to connect a non-blocking type to the sync core. 23 // Attempts to connect a non-blocking type to the sync core.
24 // 24 //
25 // Must be called from the thread where the data type lives. 25 // Must be called from the thread where the data type lives.
26 virtual void ConnectTypeToCore( 26 virtual void ConnectTypeToCore(
27 syncer::ModelType type, 27 syncer::ModelType type,
28 base::WeakPtr<NonBlockingTypeProcessor> type_processor) = 0; 28 base::WeakPtr<NonBlockingTypeProcessor> type_processor) = 0;
29 29
30 // Tells the syncer that we're no longer interested in syncing this type.
31 //
32 // Once this takes effect, the syncer can assume that it will no longer
33 // receive commit requests for this type. It should also stop requesting
34 // and applying updates for this type, too.
35 virtual void Disconnect(syncer::ModelType type) = 0;
36
30 // Creates a clone of this SyncCoreProxy. 37 // Creates a clone of this SyncCoreProxy.
31 virtual scoped_ptr<SyncCoreProxy> Clone() const = 0; 38 virtual scoped_ptr<SyncCoreProxy> Clone() const = 0;
32 }; 39 };
33 40
34 } // namespace syncer 41 } // namespace syncer
35 42
36 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_PROXY_H_ 43 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_PROXY_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/non_blocking_type_processor.h ('k') | sync/internal_api/public/test/null_sync_core_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698