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