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

Side by Side Diff: sync/internal_api/sync_core_proxy_impl.cc

Issue 351523003: sync: Mass rename of non-blocking sync classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const ref some smart pointers Created 6 years, 6 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
(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 #include "sync/internal_api/sync_core_proxy_impl.h"
6
7 #include "base/bind.h"
8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h"
10 #include "sync/engine/non_blocking_sync_common.h"
11 #include "sync/internal_api/sync_core.h"
12
13 namespace syncer {
14
15 SyncCoreProxyImpl::SyncCoreProxyImpl(
16 scoped_refptr<base::SequencedTaskRunner> sync_task_runner,
17 base::WeakPtr<SyncCore> sync_core)
18 : sync_task_runner_(sync_task_runner),
19 sync_core_(sync_core) {}
20
21 SyncCoreProxyImpl::~SyncCoreProxyImpl() {}
22
23 void SyncCoreProxyImpl::ConnectTypeToCore(
24 ModelType type,
25 const DataTypeState& data_type_state,
26 base::WeakPtr<NonBlockingTypeProcessor> type_processor) {
27 VLOG(1) << "ConnectTypeToCore: " << ModelTypeToString(type);
28 sync_task_runner_->PostTask(FROM_HERE,
29 base::Bind(&SyncCore::ConnectSyncTypeToCore,
30 sync_core_,
31 type,
32 data_type_state,
33 base::MessageLoopProxy::current(),
34 type_processor));
35 }
36
37 void SyncCoreProxyImpl::Disconnect(ModelType type) {
38 sync_task_runner_->PostTask(
39 FROM_HERE, base::Bind(&SyncCore::Disconnect, sync_core_, type));
40 }
41
42 scoped_ptr<SyncCoreProxy> SyncCoreProxyImpl::Clone() const {
43 return scoped_ptr<SyncCoreProxy>(
44 new SyncCoreProxyImpl(sync_task_runner_, sync_core_));
45 }
46
47 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_core_proxy_impl.h ('k') | sync/internal_api/sync_core_proxy_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698