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
3 // found in the LICENSE file.
5 #include "ios/public/provider/chrome/browser/keyed_service_provider.h"
7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
11 KeyedServiceProvider
* g_keyed_service_provider
= nullptr;
14 void SetKeyedServiceProvider(KeyedServiceProvider
* provider
) {
15 // Since the dependency between KeyedService is only resolved at instantiation
16 // time, forbid un-installation or overridden the global KeyedServiceProvider.
17 DCHECK(provider
&& !g_keyed_service_provider
);
18 g_keyed_service_provider
= provider
;
21 KeyedServiceProvider
* GetKeyedServiceProvider() {
22 return g_keyed_service_provider
;
25 KeyedServiceProvider::KeyedServiceProvider() {
28 KeyedServiceProvider::~KeyedServiceProvider() {
31 void KeyedServiceProvider::AssertKeyedFactoriesBuilt() {
32 GetManagedBookmarkServiceFactory();
33 GetProfileInvalidationProviderFactory();
34 GetSyncServiceFactory();