| 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 <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 void ProfileSyncService::OnNotificationsEnabled() { | 674 void ProfileSyncService::OnNotificationsEnabled() { |
| 675 notifier_registrar_.EmitOnNotificationsEnabled(); | 675 notifier_registrar_.EmitOnNotificationsEnabled(); |
| 676 } | 676 } |
| 677 | 677 |
| 678 void ProfileSyncService::OnNotificationsDisabled( | 678 void ProfileSyncService::OnNotificationsDisabled( |
| 679 syncer::NotificationsDisabledReason reason) { | 679 syncer::NotificationsDisabledReason reason) { |
| 680 notifier_registrar_.EmitOnNotificationsDisabled(reason); | 680 notifier_registrar_.EmitOnNotificationsDisabled(reason); |
| 681 } | 681 } |
| 682 | 682 |
| 683 void ProfileSyncService::OnIncomingNotification( | 683 void ProfileSyncService::OnIncomingNotification( |
| 684 const syncer::ObjectIdPayloadMap& id_payloads, | 684 const syncer::ObjectIdStateMap& id_state_map, |
| 685 syncer::IncomingNotificationSource source) { | 685 syncer::IncomingNotificationSource source) { |
| 686 notifier_registrar_.DispatchInvalidationsToHandlers(id_payloads, source); | 686 notifier_registrar_.DispatchInvalidationsToHandlers(id_state_map, source); |
| 687 } | 687 } |
| 688 | 688 |
| 689 void ProfileSyncService::OnBackendInitialized( | 689 void ProfileSyncService::OnBackendInitialized( |
| 690 const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) { | 690 const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) { |
| 691 is_first_time_sync_configure_ = !HasSyncSetupCompleted(); | 691 is_first_time_sync_configure_ = !HasSyncSetupCompleted(); |
| 692 | 692 |
| 693 if (is_first_time_sync_configure_) { | 693 if (is_first_time_sync_configure_) { |
| 694 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeFirstTimeSuccess", success); | 694 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeFirstTimeSuccess", success); |
| 695 } else { | 695 } else { |
| 696 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeRestoreSuccess", success); | 696 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeRestoreSuccess", success); |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1812 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1812 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
| 1813 ProfileSyncService* old_this = this; | 1813 ProfileSyncService* old_this = this; |
| 1814 this->~ProfileSyncService(); | 1814 this->~ProfileSyncService(); |
| 1815 new(old_this) ProfileSyncService( | 1815 new(old_this) ProfileSyncService( |
| 1816 new ProfileSyncComponentsFactoryImpl(profile, | 1816 new ProfileSyncComponentsFactoryImpl(profile, |
| 1817 CommandLine::ForCurrentProcess()), | 1817 CommandLine::ForCurrentProcess()), |
| 1818 profile, | 1818 profile, |
| 1819 signin, | 1819 signin, |
| 1820 behavior); | 1820 behavior); |
| 1821 } | 1821 } |
| OLD | NEW |