OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "ios/chrome/browser/browser_state/browser_state_keyed_service_factories
.h" |
| 6 |
| 7 #include "ios/chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
| 8 #include "ios/chrome/browser/suggestions/suggestions_service_factory.h" |
| 9 #include "ios/chrome/browser/translate/translate_accept_languages_factory.h" |
| 10 |
| 11 // This method gets the instance of each ServiceFactory. We do this so that |
| 12 // each ServiceFactory initializes itself and registers its dependencies with |
| 13 // the global PreferenceDependencyManager. We need to have a complete |
| 14 // dependency graph when we create a browser state so we can dispatch the |
| 15 // browser state creation message to the services that want to create their |
| 16 // services at browser state creation time. |
| 17 // |
| 18 // TODO(erg): This needs to be something else. I don't think putting every |
| 19 // FooServiceFactory here will scale or is desirable long term. |
| 20 void EnsureBrowserStateKeyedServiceFactoriesBuilt() { |
| 21 TranslateAcceptLanguagesFactory::GetInstance(); |
| 22 dom_distiller::DomDistillerServiceFactory::GetInstance(); |
| 23 suggestions::SuggestionsServiceFactory::GetInstance(); |
| 24 } |
OLD | NEW |