// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_BASE_FACTORY_H_ #define COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_BASE_FACTORY_H_ #include "base/memory/raw_ptr.h" #include "base/sequence_checker.h" #include "components/keyed_service/core/dependency_node.h" #include "components/keyed_service/core/keyed_service_export.h" class DependencyManager; namespace user_prefs { class PrefRegistrySyncable; } // Base class for factories that take an opaque pointer and return some service. // Not for direct usage, instead use descendent classes that deal with more // specific context objects. // // This object describes general dependency management between factories while // direct subclasses react to lifecycle events and implement memory management. // // All factories must have been created at least once before the context is // created in order to work correctly (see crbug.com/1150733). The standard way // to do this in a //content-based embedder is to call FooFactory::GetInstance() // for each factory used by your embedder from your embedder's implementation of // content::BrowserMainParts::PreMainMessageLoopRun(). class KEYED_SERVICE_EXPORT KeyedServiceBaseFactory : public DependencyNode { … }; #endif // COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_BASE_FACTORY_H_