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

Unified Diff: ios/public/test/fake_sync_service_factory.cc

Issue 1663783002: Remove the //ios/public/test target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios_tests
Patch Set: Add missing forwarding-header Created 4 years, 11 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 | « ios/public/test/fake_sync_service_factory.h ('k') | ios/public/test/test_chrome_browser_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/public/test/fake_sync_service_factory.cc
diff --git a/ios/public/test/fake_sync_service_factory.cc b/ios/public/test/fake_sync_service_factory.cc
deleted file mode 100644
index 317f5f4fae91503b80a94a2d715520fd6b6a0a50..0000000000000000000000000000000000000000
--- a/ios/public/test/fake_sync_service_factory.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2015 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 "ios/public/test/fake_sync_service_factory.h"
-
-#include "base/logging.h"
-#include "base/memory/singleton.h"
-#include "components/keyed_service/core/keyed_service.h"
-#include "components/keyed_service/ios/browser_state_dependency_manager.h"
-#include "components/sync_driver/fake_sync_service.h"
-#include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h"
-
-namespace {
-
-class KeyedFakeSyncService : public KeyedService {
- public:
- KeyedFakeSyncService() {}
-
- sync_driver::FakeSyncService* fake_sync_service() {
- return &fake_sync_service_;
- }
-
- private:
- sync_driver::FakeSyncService fake_sync_service_;
-};
-
-} // namespace
-
-namespace ios {
-
-// static
-FakeSyncServiceFactory* FakeSyncServiceFactory::GetInstance() {
- return base::Singleton<FakeSyncServiceFactory>::get();
-}
-
-// static
-sync_driver::FakeSyncService* FakeSyncServiceFactory::GetForBrowserState(
- ios::ChromeBrowserState* browser_state) {
- return static_cast<KeyedFakeSyncService*>(
- FakeSyncServiceFactory::GetInstance()->GetServiceForBrowserState(
- browser_state, true))->fake_sync_service();
-}
-
-// static
-sync_driver::FakeSyncService*
-FakeSyncServiceFactory::GetForBrowserStateIfExists(
- ios::ChromeBrowserState* browser_state) {
- return static_cast<KeyedFakeSyncService*>(
- FakeSyncServiceFactory::GetInstance()->GetServiceForBrowserState(
- browser_state, false))->fake_sync_service();
-}
-
-FakeSyncServiceFactory::FakeSyncServiceFactory()
- : BrowserStateKeyedServiceFactory(
- "FakeSyncService",
- BrowserStateDependencyManager::GetInstance()) {
-}
-
-FakeSyncServiceFactory::~FakeSyncServiceFactory() {
-}
-
-scoped_ptr<KeyedService> FakeSyncServiceFactory::BuildServiceInstanceFor(
- web::BrowserState* context) const {
- return make_scoped_ptr(new KeyedFakeSyncService);
-}
-
-} // namespace ios
« no previous file with comments | « ios/public/test/fake_sync_service_factory.h ('k') | ios/public/test/test_chrome_browser_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698