1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_IN_MEMORY_URL_INDEX_FACTORY_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_IN_MEMORY_URL_INDEX_FACTORY_H_
8 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 template <typename T
> struct DefaultSingletonTraits
;
14 class InMemoryURLIndex
;
17 class InMemoryURLIndexFactory
: public BrowserContextKeyedServiceFactory
{
19 static InMemoryURLIndex
* GetForProfile(Profile
* profile
);
20 static InMemoryURLIndexFactory
* GetInstance();
23 friend struct base::DefaultSingletonTraits
<InMemoryURLIndexFactory
>;
25 InMemoryURLIndexFactory();
26 ~InMemoryURLIndexFactory() override
;
28 // BrowserContextKeyedServiceFactory:
29 KeyedService
* BuildServiceInstanceFor(
30 content::BrowserContext
* context
) const override
;
31 content::BrowserContext
* GetBrowserContextToUse(
32 content::BrowserContext
* context
) const override
;
33 bool ServiceIsNULLWhileTesting() const override
;
36 #endif // CHROME_BROWSER_AUTOCOMPLETE_IN_MEMORY_URL_INDEX_FACTORY_H_