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_CORE_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_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 18 matching lines...) Expand all Loading... | |
29 explicit SyncCore(ModelTypeRegistry* model_type_registry); | 29 explicit SyncCore(ModelTypeRegistry* model_type_registry); |
30 ~SyncCore(); | 30 ~SyncCore(); |
31 | 31 |
32 // Initializes the connection between the sync core and its delegate on the | 32 // Initializes the connection between the sync core and its delegate on the |
33 // sync client's thread. | 33 // sync client's thread. |
34 void ConnectSyncTypeToCore( | 34 void ConnectSyncTypeToCore( |
35 syncer::ModelType type, | 35 syncer::ModelType type, |
36 scoped_refptr<base::SequencedTaskRunner> datatype_task_runner, | 36 scoped_refptr<base::SequencedTaskRunner> datatype_task_runner, |
37 base::WeakPtr<NonBlockingTypeProcessor> sync_client); | 37 base::WeakPtr<NonBlockingTypeProcessor> sync_client); |
38 | 38 |
39 void Disconnect(ModelType type); | |
Nicolas Zea
2014/05/12 19:09:10
nit: comment about the implications of this
rlarocque
2014/05/12 20:02:13
Done.
| |
40 | |
39 base::WeakPtr<SyncCore> AsWeakPtr(); | 41 base::WeakPtr<SyncCore> AsWeakPtr(); |
40 | 42 |
41 private: | 43 private: |
42 ModelTypeRegistry* model_type_registry_; | 44 ModelTypeRegistry* model_type_registry_; |
43 base::WeakPtrFactory<SyncCore> weak_ptr_factory_; | 45 base::WeakPtrFactory<SyncCore> weak_ptr_factory_; |
44 | 46 |
45 DISALLOW_COPY_AND_ASSIGN(SyncCore); | 47 DISALLOW_COPY_AND_ASSIGN(SyncCore); |
46 }; | 48 }; |
47 | 49 |
48 } // namespace syncer | 50 } // namespace syncer |
49 | 51 |
50 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_H_ | 52 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_H_ |
51 | 53 |
OLD | NEW |