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_REFCOUNTED_KEYED_SERVICE_FACTORY_H_ | 5 #ifndef COMPONENTS_KEYED_SERVICE_CORE_REFCOUNTED_KEYED_SERVICE_FACTORY_H_ |
6 #define COMPONENTS_KEYED_SERVICE_CORE_REFCOUNTED_KEYED_SERVICE_FACTORY_H_ | 6 #define COMPONENTS_KEYED_SERVICE_CORE_REFCOUNTED_KEYED_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | |
11 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "components/keyed_service/core/keyed_service_base_factory.h" | 13 #include "components/keyed_service/core/keyed_service_base_factory.h" |
14 #include "components/keyed_service/core/keyed_service_export.h" | 14 #include "components/keyed_service/core/keyed_service_export.h" |
15 | 15 |
16 class RefcountedKeyedService; | 16 class RefcountedKeyedService; |
17 | 17 |
18 // A specialized KeyedServiceBaseFactory that manages a RefcountedThreadSafe<>. | 18 // A specialized KeyedServiceBaseFactory that manages a RefcountedThreadSafe<>. |
19 // | 19 // |
20 // While the factory returns RefcountedThreadSafe<>s, the factory itself is a | 20 // While the factory returns RefcountedThreadSafe<>s, the factory itself is a |
21 // base::NotThreadSafe. Only call methods on this object on the UI thread. | 21 // base::NotThreadSafe. Only call methods on this object on the UI thread. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 KeyedServices mapping_; | 87 KeyedServices mapping_; |
88 | 88 |
89 // The mapping between a context and its overridden | 89 // The mapping between a context and its overridden |
90 // TestingFactoryFunction. | 90 // TestingFactoryFunction. |
91 OverriddenTestingFunctions testing_factories_; | 91 OverriddenTestingFunctions testing_factories_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(RefcountedKeyedServiceFactory); | 93 DISALLOW_COPY_AND_ASSIGN(RefcountedKeyedServiceFactory); |
94 }; | 94 }; |
95 | 95 |
96 #endif // COMPONENTS_KEYED_SERVICE_CORE_REFCOUNTED_KEYED_SERVICE_FACTORY_H_ | 96 #endif // COMPONENTS_KEYED_SERVICE_CORE_REFCOUNTED_KEYED_SERVICE_FACTORY_H_ |
OLD | NEW |