summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/test
diff options
context:
space:
mode:
Diffstat (limited to 'sync/internal_api/test')
-rw-r--r--sync/internal_api/test/fake_sync_manager.cc4
-rw-r--r--sync/internal_api/test/null_sync_core_proxy.cc23
2 files changed, 25 insertions, 2 deletions
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc
index 9f1abb8..c7873a8 100644
--- a/sync/internal_api/test/fake_sync_manager.cc
+++ b/sync/internal_api/test/fake_sync_manager.cc
@@ -218,8 +218,8 @@ UserShare* FakeSyncManager::GetUserShare() {
return test_user_share_.user_share();
}
-base::WeakPtr<syncer::SyncCore> FakeSyncManager::GetSyncCore() {
- return base::WeakPtr<syncer::SyncCore>();
+syncer::SyncCoreProxy* FakeSyncManager::GetSyncCoreProxy() {
+ return &null_sync_core_proxy_;
}
const std::string FakeSyncManager::cache_guid() {
diff --git a/sync/internal_api/test/null_sync_core_proxy.cc b/sync/internal_api/test/null_sync_core_proxy.cc
new file mode 100644
index 0000000..866e68b
--- /dev/null
+++ b/sync/internal_api/test/null_sync_core_proxy.cc
@@ -0,0 +1,23 @@
+// 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/internal_api/public/test/null_sync_core_proxy.h"
+
+namespace syncer {
+
+NullSyncCoreProxy::NullSyncCoreProxy() {}
+
+NullSyncCoreProxy::~NullSyncCoreProxy() {}
+
+void NullSyncCoreProxy::ConnectTypeToCore(
+ syncer::ModelType type,
+ base::WeakPtr<NonBlockingTypeProcessor> processor) {
+ NOTREACHED() << "NullSyncCoreProxy is not meant to be used";
+}
+
+scoped_ptr<SyncCoreProxy> NullSyncCoreProxy::Clone() {
+ return scoped_ptr<SyncCoreProxy>(new NullSyncCoreProxy());
+}
+
+} // namespace syncer