| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chrome_browser_state_manager_impl.h" | 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_manager_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "components/signin/core/browser/account_tracker_service.h" | 21 #include "components/signin/core/browser/account_tracker_service.h" |
| 22 #include "components/signin/core/browser/gaia_cookie_manager_service.h" | 22 #include "components/signin/core/browser/gaia_cookie_manager_service.h" |
| 23 #include "components/signin/core/browser/signin_manager.h" | 23 #include "components/signin/core/browser/signin_manager.h" |
| 24 #include "ios/chrome/browser/application_context.h" | 24 #include "ios/chrome/browser/application_context.h" |
| 25 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" | 25 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" |
| 26 #include "ios/chrome/browser/browser_state/chrome_browser_state_impl.h" | 26 #include "ios/chrome/browser/browser_state/chrome_browser_state_impl.h" |
| 27 #include "ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_i
mpl.h" | 27 #include "ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_i
mpl.h" |
| 28 #include "ios/chrome/browser/browser_state_metrics/browser_state_metrics.h" | 28 #include "ios/chrome/browser/browser_state_metrics/browser_state_metrics.h" |
| 29 #include "ios/chrome/browser/chrome_constants.h" | 29 #include "ios/chrome/browser/chrome_constants.h" |
| 30 #include "ios/chrome/browser/chrome_paths.h" | 30 #include "ios/chrome/browser/chrome_paths.h" |
| 31 #include "ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_fa
ctory.h" |
| 31 #include "ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provid
er_factory.h" | 32 #include "ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provid
er_factory.h" |
| 32 #include "ios/chrome/browser/passwords/ios_chrome_password_manager_setting_migra
tor_service_factory.h" | 33 #include "ios/chrome/browser/passwords/ios_chrome_password_manager_setting_migra
tor_service_factory.h" |
| 33 #include "ios/chrome/browser/pref_names.h" | 34 #include "ios/chrome/browser/pref_names.h" |
| 34 #include "ios/chrome/browser/signin/account_consistency_service_factory.h" | 35 #include "ios/chrome/browser/signin/account_consistency_service_factory.h" |
| 35 #include "ios/chrome/browser/signin/account_fetcher_service_factory.h" | 36 #include "ios/chrome/browser/signin/account_fetcher_service_factory.h" |
| 36 #include "ios/chrome/browser/signin/account_reconcilor_factory.h" | 37 #include "ios/chrome/browser/signin/account_reconcilor_factory.h" |
| 37 #include "ios/chrome/browser/signin/account_tracker_service_factory.h" | 38 #include "ios/chrome/browser/signin/account_tracker_service_factory.h" |
| 38 #include "ios/chrome/browser/signin/gaia_cookie_manager_service_factory.h" | 39 #include "ios/chrome/browser/signin/gaia_cookie_manager_service_factory.h" |
| 39 #include "ios/chrome/browser/signin/signin_manager_factory.h" | 40 #include "ios/chrome/browser/signin/signin_manager_factory.h" |
| 40 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" | 41 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 ios::AccountConsistencyServiceFactory::GetForBrowserState(browser_state); | 207 ios::AccountConsistencyServiceFactory::GetForBrowserState(browser_state); |
| 207 invalidation::ProfileInvalidationProvider* invalidation_provider = | 208 invalidation::ProfileInvalidationProvider* invalidation_provider = |
| 208 IOSChromeProfileInvalidationProviderFactory::GetForBrowserState( | 209 IOSChromeProfileInvalidationProviderFactory::GetForBrowserState( |
| 209 browser_state); | 210 browser_state); |
| 210 invalidation::InvalidationService* invalidation_service = | 211 invalidation::InvalidationService* invalidation_service = |
| 211 invalidation_provider ? invalidation_provider->GetInvalidationService() | 212 invalidation_provider ? invalidation_provider->GetInvalidationService() |
| 212 : nullptr; | 213 : nullptr; |
| 213 ios::AccountFetcherServiceFactory::GetForBrowserState(browser_state) | 214 ios::AccountFetcherServiceFactory::GetForBrowserState(browser_state) |
| 214 ->SetupInvalidationsOnProfileLoad(invalidation_service); | 215 ->SetupInvalidationsOnProfileLoad(invalidation_service); |
| 215 ios::AccountReconcilorFactory::GetForBrowserState(browser_state); | 216 ios::AccountReconcilorFactory::GetForBrowserState(browser_state); |
| 217 DesktopPromotionSyncServiceFactory::GetForBrowserState(browser_state); |
| 216 | 218 |
| 217 // This service is responsible for migration of the legacy password manager | 219 // This service is responsible for migration of the legacy password manager |
| 218 // preference which controls behaviour of Chrome to the new preference which | 220 // preference which controls behaviour of Chrome to the new preference which |
| 219 // controls password management behaviour on Chrome and Android. After | 221 // controls password management behaviour on Chrome and Android. After |
| 220 // migration will be performed for all users it's planned to remove the | 222 // migration will be performed for all users it's planned to remove the |
| 221 // migration code, rough time estimates are Q1 2016. | 223 // migration code, rough time estimates are Q1 2016. |
| 222 IOSChromePasswordManagerSettingMigratorServiceFactory::GetForBrowserState( | 224 IOSChromePasswordManagerSettingMigratorServiceFactory::GetForBrowserState( |
| 223 browser_state) | 225 browser_state) |
| 224 ->InitializeMigration( | 226 ->InitializeMigration( |
| 225 IOSChromeProfileSyncServiceFactory::GetForBrowserState( | 227 IOSChromeProfileSyncServiceFactory::GetForBrowserState( |
| (...skipping 19 matching lines...) Expand all Loading... |
| 245 cache->GetIndexOfBrowserStateWithPath(browser_state->GetStatePath()); | 247 cache->GetIndexOfBrowserStateWithPath(browser_state->GetStatePath()); |
| 246 if (browser_state_index != std::string::npos) { | 248 if (browser_state_index != std::string::npos) { |
| 247 // The BrowserStateInfoCache's info must match the Signin Manager. | 249 // The BrowserStateInfoCache's info must match the Signin Manager. |
| 248 cache->SetAuthInfoOfBrowserStateAtIndex(browser_state_index, | 250 cache->SetAuthInfoOfBrowserStateAtIndex(browser_state_index, |
| 249 account_info.gaia, username); | 251 account_info.gaia, username); |
| 250 return; | 252 return; |
| 251 } | 253 } |
| 252 cache->AddBrowserState(browser_state->GetStatePath(), account_info.gaia, | 254 cache->AddBrowserState(browser_state->GetStatePath(), account_info.gaia, |
| 253 username); | 255 username); |
| 254 } | 256 } |
| OLD | NEW |