BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / bookmarks / chrome_bookmark_client_factory.h
blob69760986bab8102d4388eb1f2e9cc606d5faf5b3
1 // Copyright 2014 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_BOOKMARKS_CHROME_BOOKMARK_CLIENT_FACTORY_H_
6 #define CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_FACTORY_H_
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 namespace base {
12 template <typename T>
13 struct DefaultSingletonTraits;
14 } // namespace base
16 class ChromeBookmarkClient;
17 class Profile;
19 // Singleton that owns all ChromeBookmarkClients and associates them with
20 // Profiles.
21 class ChromeBookmarkClientFactory : public BrowserContextKeyedServiceFactory {
22 public:
23 static ChromeBookmarkClient* GetForProfile(Profile* profile);
24 static ChromeBookmarkClientFactory* GetInstance();
25 static TestingFactoryFunction GetDefaultFactory();
27 private:
28 friend struct base::DefaultSingletonTraits<ChromeBookmarkClientFactory>;
30 ChromeBookmarkClientFactory();
31 ~ChromeBookmarkClientFactory() override;
33 // BrowserContextKeyedServiceFactory:
34 KeyedService* BuildServiceInstanceFor(
35 content::BrowserContext* context) const override;
36 content::BrowserContext* GetBrowserContextToUse(
37 content::BrowserContext* context) const override;
38 bool ServiceIsNULLWhileTesting() const override;
40 DISALLOW_COPY_AND_ASSIGN(ChromeBookmarkClientFactory);
43 #endif // CHROME_BROWSER_BOOKMARKS_CHROME_BOOKMARK_CLIENT_FACTORY_H_