OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ios/chrome/browser/sync/fake_sync_service_factory.h" | 5 #include "ios/chrome/browser/sync/fake_sync_service_factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "components/keyed_service/core/keyed_service.h" | 10 #include "components/keyed_service/core/keyed_service.h" |
11 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 11 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
12 #include "components/sync_driver/fake_sync_service.h" | 12 #include "components/sync/driver/fake_sync_service.h" |
13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 class KeyedFakeSyncService : public KeyedService { | 17 class KeyedFakeSyncService : public KeyedService { |
18 public: | 18 public: |
19 KeyedFakeSyncService() {} | 19 KeyedFakeSyncService() {} |
20 | 20 |
21 sync_driver::FakeSyncService* fake_sync_service() { | 21 sync_driver::FakeSyncService* fake_sync_service() { |
22 return &fake_sync_service_; | 22 return &fake_sync_service_; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 BrowserStateDependencyManager::GetInstance()) {} | 60 BrowserStateDependencyManager::GetInstance()) {} |
61 | 61 |
62 FakeSyncServiceFactory::~FakeSyncServiceFactory() {} | 62 FakeSyncServiceFactory::~FakeSyncServiceFactory() {} |
63 | 63 |
64 std::unique_ptr<KeyedService> FakeSyncServiceFactory::BuildServiceInstanceFor( | 64 std::unique_ptr<KeyedService> FakeSyncServiceFactory::BuildServiceInstanceFor( |
65 web::BrowserState* context) const { | 65 web::BrowserState* context) const { |
66 return base::WrapUnique(new KeyedFakeSyncService); | 66 return base::WrapUnique(new KeyedFakeSyncService); |
67 } | 67 } |
68 | 68 |
69 } // namespace ios | 69 } // namespace ios |
OLD | NEW |