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

Unified Diff: sync/internal_api/test/model_type_store_test_util.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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: sync/internal_api/test/model_type_store_test_util.cc
diff --git a/sync/internal_api/test/model_type_store_test_util.cc b/sync/internal_api/test/model_type_store_test_util.cc
deleted file mode 100644
index 4780844e37ebca0529e213dbbcd19ac011f29c62..0000000000000000000000000000000000000000
--- a/sync/internal_api/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 "sync/internal_api/public/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_v2 {
-
-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_v2
« no previous file with comments | « sync/internal_api/test/fake_sync_manager.cc ('k') | sync/internal_api/test/sync_manager_factory_for_profile_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698