| 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/glue/sync_start_util.h" | 5 #include "ios/chrome/browser/sync/glue/sync_start_util.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "components/browser_sync/browser/profile_sync_service.h" | 10 #include "components/browser_sync/browser/profile_sync_service.h" |
| 11 #include "components/sync_driver/sync_service.h" | 11 #include "components/sync_driver/sync_service.h" |
| 12 #include "ios/chrome/browser/application_context.h" | 12 #include "ios/chrome/browser/application_context.h" |
| 13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 13 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" | 14 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" |
| 14 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 15 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state_
manager.h" | 15 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state_
manager.h" |
| 16 #include "ios/web/public/web_thread.h" | 16 #include "ios/web/public/web_thread.h" |
| 17 | 17 |
| 18 namespace ios { | 18 namespace ios { |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 void StartSyncOnUIThread(const base::FilePath& browser_state_path, | 21 void StartSyncOnUIThread(const base::FilePath& browser_state_path, |
| 22 syncer::ModelType type) { | 22 syncer::ModelType type) { |
| 23 ios::ChromeBrowserStateManager* browser_state_manager = | 23 ios::ChromeBrowserStateManager* browser_state_manager = |
| 24 GetApplicationContext()->GetChromeBrowserStateManager(); | 24 GetApplicationContext()->GetChromeBrowserStateManager(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 55 | 55 |
| 56 namespace sync_start_util { | 56 namespace sync_start_util { |
| 57 | 57 |
| 58 syncer::SyncableService::StartSyncFlare GetFlareForSyncableService( | 58 syncer::SyncableService::StartSyncFlare GetFlareForSyncableService( |
| 59 const base::FilePath& browser_state_path) { | 59 const base::FilePath& browser_state_path) { |
| 60 return base::Bind(&StartSyncProxy, browser_state_path); | 60 return base::Bind(&StartSyncProxy, browser_state_path); |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace sync_start_util | 63 } // namespace sync_start_util |
| 64 } // namespace ios | 64 } // namespace ios |
| OLD | NEW |