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

Unified Diff: components/sync/core_impl/test/model_type_store_test_util.cc

Issue 2416823003: [Sync] Move some things from core/ to model(_impl)/. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
Index: components/sync/core_impl/test/model_type_store_test_util.cc
diff --git a/components/sync/core_impl/test/model_type_store_test_util.cc b/components/sync/core_impl/test/model_type_store_test_util.cc
deleted file mode 100644
index e594b8487e1716cea008b1733a31600ae37aee7e..0000000000000000000000000000000000000000
--- a/components/sync/core_impl/test/model_type_store_test_util.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 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 "components/sync/core/test/model_type_store_test_util.h"
-
-#include <utility>
-
-#include "base/bind.h"
-#include "base/run_loop.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace syncer {
-
-using Result = ModelTypeStore::Result;
-
-namespace {
-
-void MoveStoreToScopedPtr(std::unique_ptr<ModelTypeStore>* out_store,
- Result result,
- std::unique_ptr<ModelTypeStore> in_store) {
- ASSERT_EQ(Result::SUCCESS, result);
- std::swap(*out_store, in_store);
-}
-
-} // namespace
-
-// static
-std::unique_ptr<ModelTypeStore>
-ModelTypeStoreTestUtil::CreateInMemoryStoreForTest() {
- std::unique_ptr<ModelTypeStore> store;
- ModelTypeStore::CreateInMemoryStoreForTest(
- base::Bind(&MoveStoreToScopedPtr, &store));
-
- // Force the initialization to run now, synchronously.
- base::RunLoop().RunUntilIdle();
-
- EXPECT_TRUE(store);
- return store;
-}
-
-// static
-void ModelTypeStoreTestUtil::MoveStoreToCallback(
- std::unique_ptr<ModelTypeStore> store,
- const ModelTypeStore::InitCallback& callback) {
- ASSERT_TRUE(store);
- callback.Run(Result::SUCCESS, std::move(store));
-}
-
-} // namespace syncer
« no previous file with comments | « components/sync/core/test/model_type_store_test_util.h ('k') | components/sync/device_info/device_info_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698