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 #include "sync/internal_api/sync_core_proxy_impl.h" | 5 #include "sync/internal_api/sync_core_proxy_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "sync/internal_api/sync_core.h" | 10 #include "sync/internal_api/sync_core.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 VLOG(1) << "ConnectTypeToCore: " << ModelTypeToString(type); | 25 VLOG(1) << "ConnectTypeToCore: " << ModelTypeToString(type); |
26 sync_task_runner_->PostTask( | 26 sync_task_runner_->PostTask( |
27 FROM_HERE, | 27 FROM_HERE, |
28 base::Bind(&SyncCore::ConnectSyncTypeToCore, | 28 base::Bind(&SyncCore::ConnectSyncTypeToCore, |
29 sync_core_, | 29 sync_core_, |
30 type, | 30 type, |
31 base::MessageLoopProxy::current(), | 31 base::MessageLoopProxy::current(), |
32 type_processor)); | 32 type_processor)); |
33 } | 33 } |
34 | 34 |
| 35 void SyncCoreProxyImpl::Disconnect(ModelType type) { |
| 36 sync_task_runner_->PostTask( |
| 37 FROM_HERE, base::Bind(&SyncCore::Disconnect, sync_core_, type)); |
| 38 } |
| 39 |
35 scoped_ptr<SyncCoreProxy> SyncCoreProxyImpl::Clone() const { | 40 scoped_ptr<SyncCoreProxy> SyncCoreProxyImpl::Clone() const { |
36 return scoped_ptr<SyncCoreProxy>( | 41 return scoped_ptr<SyncCoreProxy>( |
37 new SyncCoreProxyImpl(sync_task_runner_, sync_core_)); | 42 new SyncCoreProxyImpl(sync_task_runner_, sync_core_)); |
38 } | 43 } |
39 | 44 |
40 } // namespace syncer | 45 } // namespace syncer |
OLD | NEW |