blob: 6c19c05eb226beb66bd56299799c9cc2215fffdd [file] [log] [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_IMAGE_FETCHER_FACTORY_H_
#define CHROME_BROWSER_AUTOFILL_AUTOFILL_IMAGE_FETCHER_FACTORY_H_
#include "base/no_destructor.h"
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
class KeyedService;
class Profile;
namespace autofill {
class AutofillImageFetcher;
class AutofillImageFetcherFactory : public ProfileKeyedServiceFactory {
public:
// Returns the AutofillImageFetcher for |profile|, creating it if it is not
// yet created.
static AutofillImageFetcher* GetForProfile(Profile* profile);
static AutofillImageFetcherFactory* GetInstance();
static KeyedService* BuildAutofillImageFetcher(
content::BrowserContext* context);
private:
friend class base::NoDestructor<AutofillImageFetcherFactory>;
AutofillImageFetcherFactory();
~AutofillImageFetcherFactory() override;
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
};
} // namespace autofill
#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_IMAGE_FETCHER_FACTORY_H_