| 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 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_KEYED_SERVICE_PROVIDER_H_ | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_KEYED_SERVICE_PROVIDER_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_KEYED_SERVICE_PROVIDER_H_ | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_KEYED_SERVICE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 | 10 |
| 11 enum class ServiceAccessType; | 11 enum class ServiceAccessType; |
| 12 | 12 |
| 13 class KeyedServiceBaseFactory; | 13 class KeyedServiceBaseFactory; |
| 14 class ProfileOAuth2TokenService; | |
| 15 class SigninManager; | 14 class SigninManager; |
| 16 | 15 |
| 17 namespace autofill { | 16 namespace autofill { |
| 18 class PersonalDataManager; | 17 class PersonalDataManager; |
| 19 } | 18 } |
| 20 | 19 |
| 21 namespace bookmarks { | 20 namespace bookmarks { |
| 22 class BookmarkModel; | 21 class BookmarkModel; |
| 23 } | 22 } |
| 24 | 23 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 47 // correct. | 46 // correct. |
| 48 virtual void AssertKeyedFactoriesBuilt() = 0; | 47 virtual void AssertKeyedFactoriesBuilt() = 0; |
| 49 | 48 |
| 50 // Returns the bookmarks::BookmarkModel factory for dependencies. | 49 // Returns the bookmarks::BookmarkModel factory for dependencies. |
| 51 virtual KeyedServiceBaseFactory* GetBookmarkModelFactory() = 0; | 50 virtual KeyedServiceBaseFactory* GetBookmarkModelFactory() = 0; |
| 52 | 51 |
| 53 // Returns an instance of bookmarks::BookmarkModel tied to |browser_state|. | 52 // Returns an instance of bookmarks::BookmarkModel tied to |browser_state|. |
| 54 virtual bookmarks::BookmarkModel* GetBookmarkModelForBrowserState( | 53 virtual bookmarks::BookmarkModel* GetBookmarkModelForBrowserState( |
| 55 ChromeBrowserState* browser_state) = 0; | 54 ChromeBrowserState* browser_state) = 0; |
| 56 | 55 |
| 57 // Returns the ProfileOAuth2TokenService factory for dependencies. | |
| 58 virtual KeyedServiceBaseFactory* GetProfileOAuth2TokenServiceFactory() = 0; | |
| 59 | |
| 60 // Returns an instance of ProfileOAuth2TokenService tied to | |
| 61 // |browser_state|. | |
| 62 virtual ProfileOAuth2TokenService* | |
| 63 GetProfileOAuth2TokenServiceForBrowserState( | |
| 64 ChromeBrowserState* browser_state) = 0; | |
| 65 | |
| 66 // Returns the SigninManager factory for dependencies. | 56 // Returns the SigninManager factory for dependencies. |
| 67 virtual KeyedServiceBaseFactory* GetSigninManagerFactory() = 0; | 57 virtual KeyedServiceBaseFactory* GetSigninManagerFactory() = 0; |
| 68 | 58 |
| 69 // Returns an instance of SigninManager tied to |browser_state|. | 59 // Returns an instance of SigninManager tied to |browser_state|. |
| 70 virtual SigninManager* GetSigninManagerForBrowserState( | 60 virtual SigninManager* GetSigninManagerForBrowserState( |
| 71 ChromeBrowserState* browser_state) = 0; | 61 ChromeBrowserState* browser_state) = 0; |
| 72 | 62 |
| 73 // Returns the autofill::PersonalDataManager factory for dependencies. | 63 // Returns the autofill::PersonalDataManager factory for dependencies. |
| 74 virtual KeyedServiceBaseFactory* GetPersonalDataManagerFactory() = 0; | 64 virtual KeyedServiceBaseFactory* GetPersonalDataManagerFactory() = 0; |
| 75 | 65 |
| 76 // Returns an instance of autofill::PersonalDataManager tied to | 66 // Returns an instance of autofill::PersonalDataManager tied to |
| 77 // |browser_state|. | 67 // |browser_state|. |
| 78 virtual autofill::PersonalDataManager* GetPersonalDataManagerForBrowserState( | 68 virtual autofill::PersonalDataManager* GetPersonalDataManagerForBrowserState( |
| 79 ChromeBrowserState* browser_state) = 0; | 69 ChromeBrowserState* browser_state) = 0; |
| 80 | 70 |
| 81 // Returns the sync_driver::SyncService factory for dependencies. | 71 // Returns the sync_driver::SyncService factory for dependencies. |
| 82 virtual KeyedServiceBaseFactory* GetSyncServiceFactory() = 0; | 72 virtual KeyedServiceBaseFactory* GetSyncServiceFactory() = 0; |
| 83 | 73 |
| 84 // Returns an instance of sync_driver::SyncService tied to |browser_state|. | 74 // Returns an instance of sync_driver::SyncService tied to |browser_state|. |
| 85 virtual sync_driver::SyncService* GetSyncServiceForBrowserState( | 75 virtual sync_driver::SyncService* GetSyncServiceForBrowserState( |
| 86 ChromeBrowserState* browser_state) = 0; | 76 ChromeBrowserState* browser_state) = 0; |
| 87 | 77 |
| 88 private: | 78 private: |
| 89 DISALLOW_COPY_AND_ASSIGN(KeyedServiceProvider); | 79 DISALLOW_COPY_AND_ASSIGN(KeyedServiceProvider); |
| 90 }; | 80 }; |
| 91 | 81 |
| 92 } // namespace ios | 82 } // namespace ios |
| 93 | 83 |
| 94 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_KEYED_SERVICE_PROVIDER_H_ | 84 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_KEYED_SERVICE_PROVIDER_H_ |
| OLD | NEW |