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"
10 template <typename T
> struct DefaultSingletonTraits
;
12 class InMemoryURLIndex
;
15 class InMemoryURLIndexFactory
: public BrowserContextKeyedServiceFactory
{
17 static InMemoryURLIndex
* GetForProfile(Profile
* profile
);
18 static InMemoryURLIndexFactory
* GetInstance();
21 friend struct DefaultSingletonTraits
<InMemoryURLIndexFactory
>;
23 InMemoryURLIndexFactory();
24 ~InMemoryURLIndexFactory() override
;
26 // BrowserContextKeyedServiceFactory:
27 KeyedService
* BuildServiceInstanceFor(
28 content::BrowserContext
* context
) const override
;
29 content::BrowserContext
* GetBrowserContextToUse(
30 content::BrowserContext
* context
) const override
;
31 bool ServiceIsNULLWhileTesting() const override
;
34 #endif // CHROME_BROWSER_AUTOCOMPLETE_IN_MEMORY_URL_INDEX_FACTORY_H_