| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ios/chrome/browser/bookmarks/bookmark_client_factory.h" | 5 #include "ios/chrome/browser/bookmarks/bookmark_client_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "components/keyed_service/core/service_access_type.h" | 8 #include "components/keyed_service/core/service_access_type.h" |
| 9 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 9 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
| 10 #include "ios/chrome/browser/bookmarks/bookmark_client_impl.h" | 10 #include "ios/chrome/browser/bookmarks/bookmark_client_impl.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 BookmarkClientFactory::BookmarkClientFactory() | 42 BookmarkClientFactory::BookmarkClientFactory() |
| 43 : BrowserStateKeyedServiceFactory( | 43 : BrowserStateKeyedServiceFactory( |
| 44 "BookmarkClient", | 44 "BookmarkClient", |
| 45 BrowserStateDependencyManager::GetInstance()) { | 45 BrowserStateDependencyManager::GetInstance()) { |
| 46 } | 46 } |
| 47 | 47 |
| 48 BookmarkClientFactory::~BookmarkClientFactory() {} | 48 BookmarkClientFactory::~BookmarkClientFactory() {} |
| 49 | 49 |
| 50 scoped_ptr<KeyedService> BookmarkClientFactory::BuildServiceInstanceFor( | 50 scoped_ptr<KeyedService> BookmarkClientFactory::BuildServiceInstanceFor( |
| 51 web::BrowserState* context) const { | 51 web::BrowserState* context) const { |
| 52 return BuildBookmarkClientImpl(context).Pass(); | 52 return BuildBookmarkClientImpl(context); |
| 53 } | 53 } |
| 54 | 54 |
| 55 web::BrowserState* BookmarkClientFactory::GetBrowserStateToUse( | 55 web::BrowserState* BookmarkClientFactory::GetBrowserStateToUse( |
| 56 web::BrowserState* context) const { | 56 web::BrowserState* context) const { |
| 57 return GetBrowserStateRedirectedInIncognito(context); | 57 return GetBrowserStateRedirectedInIncognito(context); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool BookmarkClientFactory::ServiceIsNULLWhileTesting() const { | 60 bool BookmarkClientFactory::ServiceIsNULLWhileTesting() const { |
| 61 return true; | 61 return true; |
| 62 } | 62 } |
| OLD | NEW |