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

Unified 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: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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..87201552e920c0ae36558cc4fd5b8d1613489875
--- /dev/null
+++ b/components/wifi_sync/wifi_credential_syncable_service_factory.h
@@ -0,0 +1,43 @@
+// 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"
+#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();
+
+ private:
+ friend struct DefaultSingletonTraits<WifiCredentialSyncableServiceFactory>;
+
+ WifiCredentialSyncableServiceFactory();
+ ~WifiCredentialSyncableServiceFactory() override;
+
+ // BrowserContextKeyedServiceFactory:
+ KeyedService* BuildServiceInstanceFor(
+ content::BrowserContext* context) const override;
+
+ DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory);
+};
+
+} // namespace wifi_sync
+
+#endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698