| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 sync_service_url_, | 282 sync_service_url_, |
| 283 local_device_->GetSyncUserAgent(), | 283 local_device_->GetSyncUserAgent(), |
| 284 profile_->GetRequestContext(), | 284 profile_->GetRequestContext(), |
| 285 browser_sync::SyncStoppedReporter::ResultCallback())); | 285 browser_sync::SyncStoppedReporter::ResultCallback())); |
| 286 scoped_ptr<browser_sync::SyncedWindowDelegatesGetter> synced_window_getter( | 286 scoped_ptr<browser_sync::SyncedWindowDelegatesGetter> synced_window_getter( |
| 287 #if defined(OS_ANDROID) | 287 #if defined(OS_ANDROID) |
| 288 new browser_sync::SyncedWindowDelegatesGetterAndroid()); | 288 new browser_sync::SyncedWindowDelegatesGetterAndroid()); |
| 289 #else | 289 #else |
| 290 new browser_sync::BrowserSyncedWindowDelegatesGetter()); | 290 new browser_sync::BrowserSyncedWindowDelegatesGetter()); |
| 291 #endif | 291 #endif |
| 292 sessions_sync_manager_.reset( | 292 sessions_sync_manager_.reset(new SessionsSyncManager( |
| 293 new SessionsSyncManager(profile, local_device_.get(), router.Pass(), | 293 sync_client_->GetSyncSessionsClient(), profile, local_device_.get(), |
| 294 synced_window_getter.Pass())); | 294 router.Pass(), synced_window_getter.Pass())); |
| 295 device_info_sync_service_.reset( | 295 device_info_sync_service_.reset( |
| 296 new DeviceInfoSyncService(local_device_.get())); | 296 new DeviceInfoSyncService(local_device_.get())); |
| 297 | 297 |
| 298 std::string last_version = sync_prefs_.GetLastRunVersion(); | 298 std::string last_version = sync_prefs_.GetLastRunVersion(); |
| 299 std::string current_version = PRODUCT_VERSION; | 299 std::string current_version = PRODUCT_VERSION; |
| 300 sync_prefs_.SetLastRunVersion(current_version); | 300 sync_prefs_.SetLastRunVersion(current_version); |
| 301 | 301 |
| 302 // Check for a major version change. Note that the versions have format | 302 // Check for a major version change. Note that the versions have format |
| 303 // MAJOR.MINOR.BUILD.PATCH. | 303 // MAJOR.MINOR.BUILD.PATCH. |
| 304 if (last_version.substr(0, last_version.find('.')) != | 304 if (last_version.substr(0, last_version.find('.')) != |
| (...skipping 2433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2738 } | 2738 } |
| 2739 | 2739 |
| 2740 std::string ProfileSyncService::unrecoverable_error_message() const { | 2740 std::string ProfileSyncService::unrecoverable_error_message() const { |
| 2741 return unrecoverable_error_message_; | 2741 return unrecoverable_error_message_; |
| 2742 } | 2742 } |
| 2743 | 2743 |
| 2744 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() | 2744 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() |
| 2745 const { | 2745 const { |
| 2746 return unrecoverable_error_location_; | 2746 return unrecoverable_error_location_; |
| 2747 } | 2747 } |
| OLD | NEW |