blob: 16e124c04203cab26608e8bf905e313c83da2809 [file] [log] [blame]
// Copyright 2015 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_AUTOCOMPLETE_IN_MEMORY_URL_INDEX_FACTORY_H_
#define CHROME_BROWSER_AUTOCOMPLETE_IN_MEMORY_URL_INDEX_FACTORY_H_
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
namespace base {
template <typename T>
class NoDestructor;
}
class InMemoryURLIndex;
class Profile;
class InMemoryURLIndexFactory : public ProfileKeyedServiceFactory {
public:
static InMemoryURLIndex* GetForProfile(Profile* profile);
static InMemoryURLIndexFactory* GetInstance();
private:
friend base::NoDestructor<InMemoryURLIndexFactory>;
InMemoryURLIndexFactory();
~InMemoryURLIndexFactory() override;
// BrowserContextKeyedServiceFactory:
std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
};
#endif // CHROME_BROWSER_AUTOCOMPLETE_IN_MEMORY_URL_INDEX_FACTORY_H_