| 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/browser_state/browser_state_keyed_service_factories
.h" | 5 #include "ios/chrome/browser/browser_state/browser_state_keyed_service_factories
.h" |
| 6 | 6 |
| 7 #include "ios/chrome/browser/autocomplete/autocomplete_classifier_factory.h" | 7 #include "ios/chrome/browser/autocomplete/autocomplete_classifier_factory.h" |
| 8 #include "ios/chrome/browser/autocomplete/in_memory_url_index_factory.h" | 8 #include "ios/chrome/browser/autocomplete/in_memory_url_index_factory.h" |
| 9 #include "ios/chrome/browser/autocomplete/shortcuts_backend_factory.h" | 9 #include "ios/chrome/browser/autocomplete/shortcuts_backend_factory.h" |
| 10 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h" |
| 11 #include "ios/chrome/browser/bookmarks/bookmark_client_factory.h" | 11 #include "ios/chrome/browser/bookmarks/bookmark_client_factory.h" |
| 12 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" | 12 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" |
| 13 #include "ios/chrome/browser/bookmarks/startup_task_runner_service_factory.h" | 13 #include "ios/chrome/browser/bookmarks/startup_task_runner_service_factory.h" |
| 14 #include "ios/chrome/browser/content_settings/cookie_settings_factory.h" | 14 #include "ios/chrome/browser/content_settings/cookie_settings_factory.h" |
| 15 #include "ios/chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 15 #include "ios/chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
| 16 #include "ios/chrome/browser/enhanced_bookmarks/bookmark_image_service_factory.h
" | |
| 17 #include "ios/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_
factory.h" | 16 #include "ios/chrome/browser/enhanced_bookmarks/bookmark_server_cluster_service_
factory.h" |
| 18 #include "ios/chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.
h" | 17 #include "ios/chrome/browser/enhanced_bookmarks/enhanced_bookmark_model_factory.
h" |
| 19 #include "ios/chrome/browser/favicon/favicon_service_factory.h" | 18 #include "ios/chrome/browser/favicon/favicon_service_factory.h" |
| 20 #include "ios/chrome/browser/google/google_url_tracker_factory.h" | 19 #include "ios/chrome/browser/google/google_url_tracker_factory.h" |
| 21 #include "ios/chrome/browser/history/history_service_factory.h" | 20 #include "ios/chrome/browser/history/history_service_factory.h" |
| 22 #include "ios/chrome/browser/history/top_sites_factory.h" | 21 #include "ios/chrome/browser/history/top_sites_factory.h" |
| 23 #include "ios/chrome/browser/history/web_history_service_factory.h" | 22 #include "ios/chrome/browser/history/web_history_service_factory.h" |
| 24 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" | 23 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
| 25 #include "ios/chrome/browser/signin/about_signin_internals_factory.h" | 24 #include "ios/chrome/browser/signin/about_signin_internals_factory.h" |
| 26 #include "ios/chrome/browser/signin/account_fetcher_service_factory.h" | 25 #include "ios/chrome/browser/signin/account_fetcher_service_factory.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 42 // each ServiceFactory initializes itself and registers its dependencies with | 41 // each ServiceFactory initializes itself and registers its dependencies with |
| 43 // the global PreferenceDependencyManager. We need to have a complete | 42 // the global PreferenceDependencyManager. We need to have a complete |
| 44 // dependency graph when we create a browser state so we can dispatch the | 43 // dependency graph when we create a browser state so we can dispatch the |
| 45 // browser state creation message to the services that want to create their | 44 // browser state creation message to the services that want to create their |
| 46 // services at browser state creation time. | 45 // services at browser state creation time. |
| 47 // | 46 // |
| 48 // TODO(erg): This needs to be something else. I don't think putting every | 47 // TODO(erg): This needs to be something else. I don't think putting every |
| 49 // FooServiceFactory here will scale or is desirable long term. | 48 // FooServiceFactory here will scale or is desirable long term. |
| 50 void EnsureBrowserStateKeyedServiceFactoriesBuilt() { | 49 void EnsureBrowserStateKeyedServiceFactoriesBuilt() { |
| 51 BookmarkClientFactory::GetInstance(); | 50 BookmarkClientFactory::GetInstance(); |
| 52 BookmarkImageServiceFactory::GetInstance(); | |
| 53 dom_distiller::DomDistillerServiceFactory::GetInstance(); | 51 dom_distiller::DomDistillerServiceFactory::GetInstance(); |
| 54 enhanced_bookmarks::BookmarkServerClusterServiceFactory::GetInstance(); | 52 enhanced_bookmarks::BookmarkServerClusterServiceFactory::GetInstance(); |
| 55 enhanced_bookmarks::EnhancedBookmarkModelFactory::GetInstance(); | 53 enhanced_bookmarks::EnhancedBookmarkModelFactory::GetInstance(); |
| 56 ios::AboutSigninInternalsFactory::GetInstance(); | 54 ios::AboutSigninInternalsFactory::GetInstance(); |
| 57 ios::AccountFetcherServiceFactory::GetInstance(); | 55 ios::AccountFetcherServiceFactory::GetInstance(); |
| 58 ios::AccountReconcilorFactory::GetInstance(); | 56 ios::AccountReconcilorFactory::GetInstance(); |
| 59 ios::AccountTrackerServiceFactory::GetInstance(); | 57 ios::AccountTrackerServiceFactory::GetInstance(); |
| 60 ios::AutocompleteClassifierFactory::GetInstance(); | 58 ios::AutocompleteClassifierFactory::GetInstance(); |
| 61 ios::BookmarkModelFactory::GetInstance(); | 59 ios::BookmarkModelFactory::GetInstance(); |
| 62 ios::BookmarkUndoServiceFactory::GetInstance(); | 60 ios::BookmarkUndoServiceFactory::GetInstance(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 77 OAuth2TokenServiceFactory::GetInstance(); | 75 OAuth2TokenServiceFactory::GetInstance(); |
| 78 PersonalDataManagerFactory::GetInstance(); | 76 PersonalDataManagerFactory::GetInstance(); |
| 79 SigninClientFactory::GetInstance(); | 77 SigninClientFactory::GetInstance(); |
| 80 suggestions::SuggestionsServiceFactory::GetInstance(); | 78 suggestions::SuggestionsServiceFactory::GetInstance(); |
| 81 SyncSetupServiceFactory::GetInstance(); | 79 SyncSetupServiceFactory::GetInstance(); |
| 82 TranslateAcceptLanguagesFactory::GetInstance(); | 80 TranslateAcceptLanguagesFactory::GetInstance(); |
| 83 | 81 |
| 84 if (ios::GetKeyedServiceProvider()) | 82 if (ios::GetKeyedServiceProvider()) |
| 85 ios::GetKeyedServiceProvider()->AssertKeyedFactoriesBuilt(); | 83 ios::GetKeyedServiceProvider()->AssertKeyedFactoriesBuilt(); |
| 86 } | 84 } |
| OLD | NEW |