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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 void ProfileSyncService::OnNotificationsEnabled() { | 662 void ProfileSyncService::OnNotificationsEnabled() { |
663 notifier_registrar_.EmitOnNotificationsEnabled(); | 663 notifier_registrar_.EmitOnNotificationsEnabled(); |
664 } | 664 } |
665 | 665 |
666 void ProfileSyncService::OnNotificationsDisabled( | 666 void ProfileSyncService::OnNotificationsDisabled( |
667 syncer::NotificationsDisabledReason reason) { | 667 syncer::NotificationsDisabledReason reason) { |
668 notifier_registrar_.EmitOnNotificationsDisabled(reason); | 668 notifier_registrar_.EmitOnNotificationsDisabled(reason); |
669 } | 669 } |
670 | 670 |
671 void ProfileSyncService::OnIncomingNotification( | 671 void ProfileSyncService::OnIncomingNotification( |
672 const syncer::ObjectIdPayloadMap& id_payloads, | 672 const syncer::ObjectIdStateMap& id_state_map, |
673 syncer::IncomingNotificationSource source) { | 673 syncer::IncomingNotificationSource source) { |
674 notifier_registrar_.DispatchInvalidationsToHandlers(id_payloads, source); | 674 notifier_registrar_.DispatchInvalidationsToHandlers(id_state_map, source); |
675 } | 675 } |
676 | 676 |
677 void ProfileSyncService::OnBackendInitialized( | 677 void ProfileSyncService::OnBackendInitialized( |
678 const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) { | 678 const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) { |
679 is_first_time_sync_configure_ = !HasSyncSetupCompleted(); | 679 is_first_time_sync_configure_ = !HasSyncSetupCompleted(); |
680 | 680 |
681 if (is_first_time_sync_configure_) { | 681 if (is_first_time_sync_configure_) { |
682 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeFirstTimeSuccess", success); | 682 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeFirstTimeSuccess", success); |
683 } else { | 683 } else { |
684 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeRestoreSuccess", success); | 684 UMA_HISTOGRAM_BOOLEAN("Sync.BackendInitializeRestoreSuccess", success); |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1800 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1800 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
1801 ProfileSyncService* old_this = this; | 1801 ProfileSyncService* old_this = this; |
1802 this->~ProfileSyncService(); | 1802 this->~ProfileSyncService(); |
1803 new(old_this) ProfileSyncService( | 1803 new(old_this) ProfileSyncService( |
1804 new ProfileSyncComponentsFactoryImpl(profile, | 1804 new ProfileSyncComponentsFactoryImpl(profile, |
1805 CommandLine::ForCurrentProcess()), | 1805 CommandLine::ForCurrentProcess()), |
1806 profile, | 1806 profile, |
1807 signin, | 1807 signin, |
1808 behavior); | 1808 behavior); |
1809 } | 1809 } |
OLD | NEW |