Add ICU message format support
[chromium-blink-merge.git] / ios / public / provider / chrome / browser / keyed_service_provider.cc
blob61d80f4bdd6d94aa2a678a4a40ca45d545af8555
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"
9 namespace ios {
10 namespace {
11 KeyedServiceProvider* g_keyed_service_provider = nullptr;
12 } // namespace
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();
37 } // namespace ios