| // Copyright 2021 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 CHROME_BROWSER_SYNC_DESK_SYNC_SERVICE_FACTORY_H_ |
| #define CHROME_BROWSER_SYNC_DESK_SYNC_SERVICE_FACTORY_H_ |
| #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
| struct DefaultSingletonTraits; |
| namespace desks_storage { |
| } // namespace desks_storage |
| // A factory to create DeskSyncService for a given browser context. |
| class DeskSyncServiceFactory : public ProfileKeyedServiceFactory { |
| static desks_storage::DeskSyncService* GetForProfile(Profile* profile); |
| static DeskSyncServiceFactory* GetInstance(); |
| friend struct base::DefaultSingletonTraits<DeskSyncServiceFactory>; |
| DeskSyncServiceFactory(); |
| DeskSyncServiceFactory(const DeskSyncServiceFactory&) = delete; |
| DeskSyncServiceFactory& operator=(const DeskSyncServiceFactory&) = delete; |
| ~DeskSyncServiceFactory() override = default; |
| // BrowserContextKeyedServiceFactory: |
| KeyedService* BuildServiceInstanceFor( |
| content::BrowserContext* context) const override; |
| #endif // CHROME_BROWSER_SYNC_DESK_SYNC_SERVICE_FACTORY_H_ |