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/enhanced_bookmarks/bookmark_server_cluster_service_
factory.h" | 5 #include "ios/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_
factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "components/enhanced_bookmarks/bookmark_server_cluster_service.h" | 9 #include "components/enhanced_bookmarks/bookmark_server_cluster_service.h" |
10 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 10 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
11 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 11 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
12 #include "components/signin/core/browser/signin_manager.h" | 12 #include "components/signin/core/browser/signin_manager.h" |
13 #include "ios/chrome/browser/application_context.h" | 13 #include "ios/chrome/browser/application_context.h" |
14 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" | 14 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" |
15 #include "ios/chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.
h" | 15 #include "ios/chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.
h" |
16 #include "ios/chrome/browser/signin/oauth2_token_service_factory.h" | 16 #include "ios/chrome/browser/signin/oauth2_token_service_factory.h" |
17 #include "ios/chrome/browser/signin/signin_manager_factory.h" | 17 #include "ios/chrome/browser/signin/signin_manager_factory.h" |
18 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | 18 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" |
19 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 19 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
20 #include "ios/public/provider/chrome/browser/keyed_service_provider.h" | 20 #include "ios/public/provider/chrome/browser/keyed_service_provider.h" |
21 | 21 |
22 namespace enhanced_bookmarks { | 22 namespace enhanced_bookmarks { |
23 | 23 |
24 // static | 24 // static |
25 BookmarkServerClusterServiceFactory* | 25 BookmarkServerClusterServiceFactory* |
26 BookmarkServerClusterServiceFactory::GetInstance() { | 26 BookmarkServerClusterServiceFactory::GetInstance() { |
27 return Singleton<BookmarkServerClusterServiceFactory>::get(); | 27 return base::Singleton<BookmarkServerClusterServiceFactory>::get(); |
28 } | 28 } |
29 | 29 |
30 // static | 30 // static |
31 BookmarkServerClusterService* | 31 BookmarkServerClusterService* |
32 BookmarkServerClusterServiceFactory::GetForBrowserState( | 32 BookmarkServerClusterServiceFactory::GetForBrowserState( |
33 ios::ChromeBrowserState* browser_state) { | 33 ios::ChromeBrowserState* browser_state) { |
34 return static_cast<BookmarkServerClusterService*>( | 34 return static_cast<BookmarkServerClusterService*>( |
35 GetInstance()->GetServiceForBrowserState(browser_state, true)); | 35 GetInstance()->GetServiceForBrowserState(browser_state, true)); |
36 } | 36 } |
37 | 37 |
(...skipping 27 matching lines...) Expand all Loading... |
65 provider->GetSyncServiceForBrowserState(browser_state), | 65 provider->GetSyncServiceForBrowserState(browser_state), |
66 browser_state->GetPrefs())); | 66 browser_state->GetPrefs())); |
67 } | 67 } |
68 | 68 |
69 web::BrowserState* BookmarkServerClusterServiceFactory::GetBrowserStateToUse( | 69 web::BrowserState* BookmarkServerClusterServiceFactory::GetBrowserStateToUse( |
70 web::BrowserState* context) const { | 70 web::BrowserState* context) const { |
71 return GetBrowserStateRedirectedInIncognito(context); | 71 return GetBrowserStateRedirectedInIncognito(context); |
72 } | 72 } |
73 | 73 |
74 } // namespace enhanced_bookmarks | 74 } // namespace enhanced_bookmarks |
OLD | NEW |