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

Side by Side Diff: sync/internal_api/sync_core.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
« no previous file with comments | « sync/internal_api/sync_core.h ('k') | sync/internal_api/sync_core_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h"
6
7 #include "sync/engine/non_blocking_type_processor_core.h"
8 #include "sync/sessions/model_type_registry.h"
9
10 namespace syncer {
11
12 SyncCore::SyncCore(ModelTypeRegistry* model_type_registry)
13 : model_type_registry_(model_type_registry), weak_ptr_factory_(this) {}
14
15 SyncCore::~SyncCore() {}
16
17 void SyncCore::ConnectSyncTypeToCore(
18 ModelType type,
19 const DataTypeState& data_type_state,
20 scoped_refptr<base::SequencedTaskRunner> task_runner,
21 base::WeakPtr<NonBlockingTypeProcessor> processor) {
22 // Initialize the processor's sync-thread sibling and the
23 // processor <-> processor_core (ie. model thread <-> sync thread)
24 // communication channel.
25 model_type_registry_->InitializeNonBlockingType(
26 type, data_type_state, task_runner, processor);
27 }
28
29 void SyncCore::Disconnect(ModelType type) {
30 model_type_registry_->RemoveNonBlockingType(type);
31 }
32
33 base::WeakPtr<SyncCore> SyncCore::AsWeakPtr() {
34 return weak_ptr_factory_.GetWeakPtr();
35 }
36
37 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_core.h ('k') | sync/internal_api/sync_core_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698