blob: 9fff74ee67d6f81478298cb5f6711a7a0d90727b [file] [log] [blame]
Avi Drissmanae7b33a42022-09-13 16:51:071// Copyright 2022 The Chromium Authors
Qihui Zhao0cfcf2002022-09-09 22:17:292// 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_AUTOFILL_IBAN_MANAGER_FACTORY_H_
6#define CHROME_BROWSER_AUTOFILL_IBAN_MANAGER_FACTORY_H_
7
Ryan Sultanem421df1e2023-01-13 15:05:508#include "chrome/browser/profiles/profile_keyed_service_factory.h"
Qihui Zhao0cfcf2002022-09-09 22:17:299#include "components/keyed_service/core/keyed_service.h"
10
11namespace base {
12template <typename T>
Mikel Astiz77b19d7e2023-05-30 06:36:0913class NoDestructor;
Qihui Zhao0cfcf2002022-09-09 22:17:2914}
15
16class Profile;
17
18namespace autofill {
19
20class IBANManager;
21
22// Singleton that owns all IBANManagers and associates them with Profiles.
Ryan Sultanem421df1e2023-01-13 15:05:5023class IBANManagerFactory : public ProfileKeyedServiceFactory {
Qihui Zhao0cfcf2002022-09-09 22:17:2924 public:
25 // Returns the IBANManager for |profile|, creating it if it is not yet
26 // created.
27 static IBANManager* GetForProfile(Profile* profile);
28
29 static IBANManagerFactory* GetInstance();
30
31 private:
Mikel Astiz77b19d7e2023-05-30 06:36:0932 friend base::NoDestructor<IBANManagerFactory>;
Qihui Zhao0cfcf2002022-09-09 22:17:2933
34 IBANManagerFactory();
35 ~IBANManagerFactory() override;
36
37 // BrowserContextKeyedServiceFactory:
38 KeyedService* BuildServiceInstanceFor(
39 content::BrowserContext* profile) const override;
Qihui Zhao0cfcf2002022-09-09 22:17:2940};
41
42} // namespace autofill
43
44#endif // CHROME_BROWSER_AUTOFILL_IBAN_MANAGER_FACTORY_H_