OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_FACTORY_H_ | 5 #ifndef COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_FACTORY_H_ |
6 #define COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_FACTORY_H_ | 6 #define COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | |
11 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
12 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "components/keyed_service/core/keyed_service_base_factory.h" | 14 #include "components/keyed_service/core/keyed_service_base_factory.h" |
15 #include "components/keyed_service/core/keyed_service_export.h" | 15 #include "components/keyed_service/core/keyed_service_export.h" |
16 | 16 |
17 class DependencyManager; | 17 class DependencyManager; |
18 class KeyedService; | 18 class KeyedService; |
19 | 19 |
20 // Base class for Factories that take a base::SupportsUserData object and return | 20 // Base class for Factories that take a base::SupportsUserData object and return |
21 // some service on a one-to-one mapping. Each concrete factory that derives from | 21 // some service on a one-to-one mapping. Each concrete factory that derives from |
22 // this class *must* be a Singleton (only unit tests don't do that). | 22 // this class *must* be a Singleton (only unit tests don't do that). |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 KeyedServices mapping_; | 90 KeyedServices mapping_; |
91 | 91 |
92 // The mapping between a context and its overridden | 92 // The mapping between a context and its overridden |
93 // TestingFactoryFunction. | 93 // TestingFactoryFunction. |
94 OverriddenTestingFunctions testing_factories_; | 94 OverriddenTestingFunctions testing_factories_; |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(KeyedServiceFactory); | 96 DISALLOW_COPY_AND_ASSIGN(KeyedServiceFactory); |
97 }; | 97 }; |
98 | 98 |
99 #endif // COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_FACTORY_H_ | 99 #endif // COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_FACTORY_H_ |
OLD | NEW |