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

Side by Side Diff: components/wifi_sync/wifi_credential_syncable_service_factory.h

Issue 709683004: components: add wifi_sync component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-1-security-class
Patch Set: fix android_aosp build Created 6 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_
6 #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_
7
8 #include "base/macros.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
11
12 namespace content {
13 class BrowserContext;
14 }
15
16 namespace wifi_sync {
17
18 class WifiCredentialSyncableService;
19
20 // Singleton that owns all WifiCredentialSyncableServices and
21 // associates them with Profiles. Listens for the Profile's
22 // destruction notification and cleans up the associated
23 // WifiCredentialSyncableServices.
24 class WifiCredentialSyncableServiceFactory
25 : public BrowserContextKeyedServiceFactory {
26 public:
27 // Returns the SyncableService for |browser_context|, creating the
28 // SyncableService if one does not already exist.
29 static WifiCredentialSyncableService* GetForBrowserContext(
30 content::BrowserContext* browser_context);
31
32 // Returns the singleton instance. As this class has no public
33 // instance methods, this function is not generally useful for
34 // external callers. This function is public only so that the
35 // Singleton template can reference it.
36 static WifiCredentialSyncableServiceFactory* GetInstance();
37
38 private:
39 friend struct DefaultSingletonTraits<WifiCredentialSyncableServiceFactory>;
40
41 WifiCredentialSyncableServiceFactory();
42 ~WifiCredentialSyncableServiceFactory() override;
43
44 // Implementation of BrowserContextKeyedServiceFactory.
45 KeyedService* BuildServiceInstanceFor(
46 content::BrowserContext* context) const override;
47
48 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory);
49 };
50
51 } // namespace wifi_sync
52
53 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698