Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: chrome/browser/policy/schema_registry_service_factory.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_FACTORY_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // Creates a new SchemaRegistryService for |context|, which must be managed 39 // Creates a new SchemaRegistryService for |context|, which must be managed
40 // by the caller. Subsequent calls to GetForContext() will return the instance 40 // by the caller. Subsequent calls to GetForContext() will return the instance
41 // created, as long as it lives. 41 // created, as long as it lives.
42 static scoped_ptr<SchemaRegistryService> CreateForContext( 42 static scoped_ptr<SchemaRegistryService> CreateForContext(
43 content::BrowserContext* context, 43 content::BrowserContext* context,
44 const Schema& chrome_schema, 44 const Schema& chrome_schema,
45 CombinedSchemaRegistry* global_registry); 45 CombinedSchemaRegistry* global_registry);
46 46
47 private: 47 private:
48 friend struct DefaultSingletonTraits<SchemaRegistryServiceFactory>; 48 friend struct base::DefaultSingletonTraits<SchemaRegistryServiceFactory>;
49 49
50 SchemaRegistryServiceFactory(); 50 SchemaRegistryServiceFactory();
51 ~SchemaRegistryServiceFactory() override; 51 ~SchemaRegistryServiceFactory() override;
52 52
53 SchemaRegistryService* GetForContextInternal( 53 SchemaRegistryService* GetForContextInternal(
54 content::BrowserContext* context); 54 content::BrowserContext* context);
55 55
56 scoped_ptr<SchemaRegistryService> CreateForContextInternal( 56 scoped_ptr<SchemaRegistryService> CreateForContextInternal(
57 content::BrowserContext* context, 57 content::BrowserContext* context,
58 const Schema& chrome_schema, 58 const Schema& chrome_schema,
59 CombinedSchemaRegistry* global_registry); 59 CombinedSchemaRegistry* global_registry);
60 60
61 // BrowserContextKeyedBaseFactory: 61 // BrowserContextKeyedBaseFactory:
62 void BrowserContextShutdown(content::BrowserContext* context) override; 62 void BrowserContextShutdown(content::BrowserContext* context) override;
63 void BrowserContextDestroyed(content::BrowserContext* context) override; 63 void BrowserContextDestroyed(content::BrowserContext* context) override;
64 void SetEmptyTestingFactory(content::BrowserContext* context) override; 64 void SetEmptyTestingFactory(content::BrowserContext* context) override;
65 bool HasTestingFactory(content::BrowserContext* context) override; 65 bool HasTestingFactory(content::BrowserContext* context) override;
66 void CreateServiceNow(content::BrowserContext* context) override; 66 void CreateServiceNow(content::BrowserContext* context) override;
67 67
68 typedef std::map<content::BrowserContext*, SchemaRegistryService*> 68 typedef std::map<content::BrowserContext*, SchemaRegistryService*>
69 RegistryMap; 69 RegistryMap;
70 RegistryMap registries_; 70 RegistryMap registries_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(SchemaRegistryServiceFactory); 72 DISALLOW_COPY_AND_ASSIGN(SchemaRegistryServiceFactory);
73 }; 73 };
74 74
75 } // namespace policy 75 } // namespace policy
76 76
77 #endif // CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_FACTORY_H_ 77 #endif // CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_factory.cc ('k') | chrome/browser/policy/schema_registry_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698