| 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/sync/ios_chrome_profile_sync_service_factory.h" | 5 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "components/browser_sync/browser/profile_sync_service.h" | 11 #include "components/browser_sync/browser/profile_sync_service.h" |
| 12 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 12 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
| 13 #include "components/network_time/network_time_tracker.h" | 13 #include "components/network_time/network_time_tracker.h" |
| 14 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 14 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 15 #include "components/signin/core/browser/signin_manager.h" | 15 #include "components/signin/core/browser/signin_manager.h" |
| 16 #include "components/sync_driver/signin_manager_wrapper.h" | 16 #include "components/sync_driver/signin_manager_wrapper.h" |
| 17 #include "components/sync_driver/startup_controller.h" | 17 #include "components/sync_driver/startup_controller.h" |
| 18 #include "components/sync_driver/sync_util.h" | 18 #include "components/sync_driver/sync_util.h" |
| 19 #include "ios/chrome/browser/application_context.h" | 19 #include "ios/chrome/browser/application_context.h" |
| 20 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h" | 20 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h" |
| 21 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" | 21 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" |
| 22 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 22 #include "ios/chrome/browser/favicon/favicon_service_factory.h" | 23 #include "ios/chrome/browser/favicon/favicon_service_factory.h" |
| 23 #include "ios/chrome/browser/history/history_service_factory.h" | 24 #include "ios/chrome/browser/history/history_service_factory.h" |
| 24 #include "ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provid
er_factory.h" | 25 #include "ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provid
er_factory.h" |
| 25 #include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h" | 26 #include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h" |
| 26 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" | 27 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
| 27 #include "ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory
.h" | 28 #include "ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory
.h" |
| 28 #include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h" | 29 #include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h" |
| 29 #include "ios/chrome/browser/signin/about_signin_internals_factory.h" | 30 #include "ios/chrome/browser/signin/about_signin_internals_factory.h" |
| 30 #include "ios/chrome/browser/signin/oauth2_token_service_factory.h" | 31 #include "ios/chrome/browser/signin/oauth2_token_service_factory.h" |
| 31 #include "ios/chrome/browser/signin/signin_client_factory.h" | 32 #include "ios/chrome/browser/signin/signin_client_factory.h" |
| 32 #include "ios/chrome/browser/signin/signin_manager_factory.h" | 33 #include "ios/chrome/browser/signin/signin_manager_factory.h" |
| 33 #include "ios/chrome/browser/sync/ios_chrome_sync_client.h" | 34 #include "ios/chrome/browser/sync/ios_chrome_sync_client.h" |
| 34 #include "ios/chrome/browser/web_data_service_factory.h" | 35 #include "ios/chrome/browser/web_data_service_factory.h" |
| 35 #include "ios/chrome/common/channel_info.h" | 36 #include "ios/chrome/common/channel_info.h" |
| 36 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 37 #include "ios/web/public/web_thread.h" | 37 #include "ios/web/public/web_thread.h" |
| 38 #include "url/gurl.h" | 38 #include "url/gurl.h" |
| 39 | 39 |
| 40 namespace { | 40 namespace { |
| 41 | 41 |
| 42 void UpdateNetworkTimeOnUIThread(base::Time network_time, | 42 void UpdateNetworkTimeOnUIThread(base::Time network_time, |
| 43 base::TimeDelta resolution, | 43 base::TimeDelta resolution, |
| 44 base::TimeDelta latency, | 44 base::TimeDelta latency, |
| 45 base::TimeTicks post_time) { | 45 base::TimeTicks post_time) { |
| 46 GetApplicationContext()->GetNetworkTimeTracker()->UpdateNetworkTime( | 46 GetApplicationContext()->GetNetworkTimeTracker()->UpdateNetworkTime( |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 init_params.file_thread = | 144 init_params.file_thread = |
| 145 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE); | 145 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE); |
| 146 init_params.blocking_pool = web::WebThread::GetBlockingPool(); | 146 init_params.blocking_pool = web::WebThread::GetBlockingPool(); |
| 147 | 147 |
| 148 auto pss = make_scoped_ptr(new ProfileSyncService(std::move(init_params))); | 148 auto pss = make_scoped_ptr(new ProfileSyncService(std::move(init_params))); |
| 149 | 149 |
| 150 // Will also initialize the sync client. | 150 // Will also initialize the sync client. |
| 151 pss->Initialize(); | 151 pss->Initialize(); |
| 152 return std::move(pss); | 152 return std::move(pss); |
| 153 } | 153 } |
| OLD | NEW |