Chromium Code Reviews| Index: components/wifi_sync/wifi_credential_syncable_service_factory.h |
| diff --git a/components/wifi_sync/wifi_credential_syncable_service_factory.h b/components/wifi_sync/wifi_credential_syncable_service_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ce48cc28e70ab64b68d2c3ad339b3999f540a473 |
| --- /dev/null |
| +++ b/components/wifi_sync/wifi_credential_syncable_service_factory.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |
| +#define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |
| + |
| +#include "base/basictypes.h" |
|
erikwright (departed)
2014/10/29 18:18:25
I believe "macros.h" is now the direct line for DI
mukesh agrawal
2014/10/30 18:41:29
Dropping this file for now, per comment from erg@.
|
| +#include "base/memory/singleton.h" |
| +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
| + |
| +class Profile; |
| + |
| +namespace wifi_sync { |
| + |
| +class WifiCredentialSyncableService; |
| + |
| +// Singleton that owns all WifiCredentialSyncableServices and |
| +// associates them with Profiles. Listens for the Profile's |
| +// destruction notification and cleans up the associated |
| +// WifiCredentialSyncableServices. |
| +class WifiCredentialSyncableServiceFactory |
| + : public BrowserContextKeyedServiceFactory { |
| + public: |
| + static WifiCredentialSyncableService* GetForProfile(Profile* profile); |
| + |
| + static WifiCredentialSyncableServiceFactory* GetInstance(); |
| + |
| + static KeyedService* BuildInstanceFor( |
|
pavely
2014/10/30 00:25:38
You've stubbed more functions than absolutely nece
mukesh agrawal
2014/10/30 18:41:29
Acknowledged.
|
| + content::BrowserContext* browser_context); |
| + |
| + private: |
| + friend struct DefaultSingletonTraits<WifiCredentialSyncableServiceFactory>; |
| + |
| + WifiCredentialSyncableServiceFactory(); |
| + ~WifiCredentialSyncableServiceFactory() override; |
|
erikwright (departed)
2014/10/29 18:18:25
I don't believe override is technically correct he
Elliot Glaysher
2014/10/29 19:41:18
override is the correct thing here. You should not
mukesh agrawal
2014/10/30 18:41:29
Acknowledged.
|
| + |
| + // BrowserContextKeyedServiceFactory: |
| + KeyedService* BuildServiceInstanceFor( |
| + content::BrowserContext* context) const override; |
| + content::BrowserContext* GetBrowserContextToUse( |
| + content::BrowserContext* context) const override; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory); |
| +}; |
| + |
| +} // namespace wifi_sync |
| + |
| +#endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |