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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 backend_->UpdateRegisteredInvalidationIds( | 461 backend_->UpdateRegisteredInvalidationIds( |
462 invalidator_registrar_.GetAllRegisteredIds()); | 462 invalidator_registrar_.GetAllRegisteredIds()); |
463 } | 463 } |
464 } | 464 } |
465 | 465 |
466 void ProfileSyncService::UnregisterInvalidationHandler( | 466 void ProfileSyncService::UnregisterInvalidationHandler( |
467 syncer::InvalidationHandler* handler) { | 467 syncer::InvalidationHandler* handler) { |
468 invalidator_registrar_.UnregisterHandler(handler); | 468 invalidator_registrar_.UnregisterHandler(handler); |
469 } | 469 } |
470 | 470 |
| 471 void ProfileSyncService::AcknowledgeInvalidation( |
| 472 const invalidation::ObjectId& id, |
| 473 const syncer::AckHandle& ack_handle) { |
| 474 // TODO(dcheng): This DCHECK is probably wrong. |
| 475 DCHECK(backend_.get()); |
| 476 backend_->AcknowledgeInvalidation(id, ack_handle); |
| 477 } |
| 478 |
471 syncer::InvalidatorState ProfileSyncService::GetInvalidatorState() const { | 479 syncer::InvalidatorState ProfileSyncService::GetInvalidatorState() const { |
472 return invalidator_registrar_.GetInvalidatorState(); | 480 return invalidator_registrar_.GetInvalidatorState(); |
473 } | 481 } |
474 | 482 |
475 void ProfileSyncService::Shutdown() { | 483 void ProfileSyncService::Shutdown() { |
476 ShutdownImpl(false); | 484 ShutdownImpl(false); |
477 } | 485 } |
478 | 486 |
479 void ProfileSyncService::ShutdownImpl(bool sync_disabled) { | 487 void ProfileSyncService::ShutdownImpl(bool sync_disabled) { |
480 // First, we spin down the backend and wait for it to stop syncing completely | 488 // First, we spin down the backend and wait for it to stop syncing completely |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1822 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
1815 ProfileSyncService* old_this = this; | 1823 ProfileSyncService* old_this = this; |
1816 this->~ProfileSyncService(); | 1824 this->~ProfileSyncService(); |
1817 new(old_this) ProfileSyncService( | 1825 new(old_this) ProfileSyncService( |
1818 new ProfileSyncComponentsFactoryImpl(profile, | 1826 new ProfileSyncComponentsFactoryImpl(profile, |
1819 CommandLine::ForCurrentProcess()), | 1827 CommandLine::ForCurrentProcess()), |
1820 profile, | 1828 profile, |
1821 signin, | 1829 signin, |
1822 behavior); | 1830 behavior); |
1823 } | 1831 } |
OLD | NEW |