Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / enhanced_bookmarks / android / bookmark_image_service_factory.cc
blobc994bbfd1f207146b3eaa358ed3f3007b4a8812b
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 #include "chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.h"
6 #include "chrome/browser/enhanced_bookmarks/android/bookmark_image_service_factory.h"
7 #include "components/keyed_service/content/browser_context_dependency_manager.h"
8 #include "content/public/browser/browser_context.h"
10 namespace enhanced_bookmarks {
12 // static
13 BookmarkImageServiceFactory* BookmarkImageServiceFactory::GetInstance() {
14 return Singleton<BookmarkImageServiceFactory>::get();
17 // static
18 BookmarkImageService* BookmarkImageServiceFactory::GetForBrowserContext(
19 content::BrowserContext* context) {
20 return static_cast<BookmarkImageService*>(
21 GetInstance()->GetServiceForBrowserContext(context, true));
24 BookmarkImageServiceFactory::BookmarkImageServiceFactory()
25 : BrowserContextKeyedServiceFactory(
26 "BookmarkExtendedStorageService",
27 BrowserContextDependencyManager::GetInstance()) {}
29 BookmarkImageServiceFactory::~BookmarkImageServiceFactory() {}
31 content::BrowserContext* BookmarkImageServiceFactory::GetBrowserContextToUse(
32 content::BrowserContext* context) const {
33 return context;
36 BookmarkImageService* BookmarkImageServiceFactory::BuildServiceInstanceFor(
37 content::BrowserContext* browser_context) const {
38 return new BookmarkImageServiceAndroid(browser_context);
41 } // namespace enhanced_bookmarks