blob: e3ae516776e09a441ae535e45cfa052ae3b649fe [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2017 The Chromium Authors
skym512bdb12017-05-10 15:17:132// 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_SYNC_USER_EVENT_SERVICE_FACTORY_H_
6#define CHROME_BROWSER_SYNC_USER_EVENT_SERVICE_FACTORY_H_
7
Mikel Astiz128448a2023-06-01 17:50:368#include "base/no_destructor.h"
Ryan Sultanem7d0bbadf2022-08-22 16:21:189#include "chrome/browser/profiles/profile_keyed_service_factory.h"
skym512bdb12017-05-10 15:17:1310
11class Profile;
12
13namespace syncer {
14class UserEventService;
15} // namespace syncer
16
17namespace browser_sync {
18
Ryan Sultanem7d0bbadf2022-08-22 16:21:1819class UserEventServiceFactory : public ProfileKeyedServiceFactory {
skym512bdb12017-05-10 15:17:1320 public:
21 static syncer::UserEventService* GetForProfile(Profile* profile);
22 static UserEventServiceFactory* GetInstance();
23
Peter Boströmfadb1752021-09-30 19:17:0124 UserEventServiceFactory(const UserEventServiceFactory&) = delete;
25 UserEventServiceFactory& operator=(const UserEventServiceFactory&) = delete;
26
skym512bdb12017-05-10 15:17:1327 private:
Mikel Astiz128448a2023-06-01 17:50:3628 friend base::NoDestructor<UserEventServiceFactory>;
skym512bdb12017-05-10 15:17:1329
30 UserEventServiceFactory();
31 ~UserEventServiceFactory() override;
32
33 // BrowserContextKeyedServiceFactory:
Arthur Milchior0816385a2024-11-04 14:58:2734 std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(
skym512bdb12017-05-10 15:17:1335 content::BrowserContext* context) const override;
skym512bdb12017-05-10 15:17:1336};
37
38} // namespace browser_sync
39
40#endif // CHROME_BROWSER_SYNC_USER_EVENT_SERVICE_FACTORY_H_