Home | History | Annotate | Download | only in sync_notifier
      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 CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_SERVICE_FACTORY_H_
      6 #define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_SERVICE_FACTORY_H_
      7 
      8 #include "base/memory/singleton.h"
      9 #include "chrome/browser/profiles/profile.h"
     10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
     11 
     12 namespace notifier {
     13 
     14 class SyncedNotificationAppInfoService;
     15 
     16 class SyncedNotificationAppInfoServiceFactory
     17     : public BrowserContextKeyedServiceFactory {
     18  public:
     19   // Return the SyncedNotificationAppInfoService for this profile.
     20   static SyncedNotificationAppInfoService* GetForProfile(
     21       Profile* profile,
     22       Profile::ServiceAccessType service_access_type);
     23 
     24   // Get the factory.
     25   static SyncedNotificationAppInfoServiceFactory* GetInstance();
     26 
     27  private:
     28   friend struct DefaultSingletonTraits<SyncedNotificationAppInfoServiceFactory>;
     29 
     30   SyncedNotificationAppInfoServiceFactory();
     31   virtual ~SyncedNotificationAppInfoServiceFactory();
     32 
     33   // BrowserContextKeyedServiceFactory:
     34   virtual KeyedService* BuildServiceInstanceFor(
     35       content::BrowserContext* profile) const OVERRIDE;
     36 };
     37 
     38 }  // namespace notifier
     39 
     40 #endif  // CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_SERVICE_FACTORY_H_
     41