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

Unified Diff: sync/test/engine/injectable_sync_core_proxy.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/test/engine/injectable_sync_core_proxy.h ('k') | sync/test/engine/mock_model_type_sync_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/engine/injectable_sync_core_proxy.cc
diff --git a/sync/test/engine/injectable_sync_core_proxy.cc b/sync/test/engine/injectable_sync_core_proxy.cc
deleted file mode 100644
index 4041736f91911865fbfc3c47864546105bebcfdc..0000000000000000000000000000000000000000
--- a/sync/test/engine/injectable_sync_core_proxy.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sync/test/engine/injectable_sync_core_proxy.h"
-
-#include "sync/engine/non_blocking_type_processor.h"
-#include "sync/engine/non_blocking_type_processor_core_interface.h"
-
-namespace syncer {
-
-InjectableSyncCoreProxy::InjectableSyncCoreProxy(
- NonBlockingTypeProcessorCoreInterface* core)
- : is_core_connected_(false), processor_core_(core) {
-}
-
-InjectableSyncCoreProxy::~InjectableSyncCoreProxy() {
-}
-
-void InjectableSyncCoreProxy::ConnectTypeToCore(
- syncer::ModelType type,
- const DataTypeState& data_type_state,
- base::WeakPtr<syncer::NonBlockingTypeProcessor> type_processor) {
- // This class is allowed to participate in only one connection.
- DCHECK(!is_core_connected_);
- is_core_connected_ = true;
-
- // Hands off ownership of our member to the type_processor, while keeping
- // an unsafe pointer to it. This is why we can only connect once.
- scoped_ptr<NonBlockingTypeProcessorCoreInterface> core(processor_core_);
-
- type_processor->OnConnect(core.Pass());
-}
-
-void InjectableSyncCoreProxy::Disconnect(syncer::ModelType type) {
- // This should delete the core, but we don't own it.
- processor_core_ = NULL;
-}
-
-scoped_ptr<SyncCoreProxy> InjectableSyncCoreProxy::Clone() const {
- // This confuses ownership. We trust that our callers are well-behaved.
- return scoped_ptr<SyncCoreProxy>(
- new InjectableSyncCoreProxy(processor_core_));
-}
-
-NonBlockingTypeProcessorCoreInterface*
-InjectableSyncCoreProxy::GetProcessorCore() {
- return processor_core_;
-}
-
-} // namespace syncer
« no previous file with comments | « sync/test/engine/injectable_sync_core_proxy.h ('k') | sync/test/engine/mock_model_type_sync_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698