Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 10911084: Implement Invalidator::Acknowledge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restart test + more cleanup Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 backend_->UpdateRegisteredInvalidationIds( 469 backend_->UpdateRegisteredInvalidationIds(
470 invalidator_registrar_->GetAllRegisteredIds()); 470 invalidator_registrar_->GetAllRegisteredIds());
471 } 471 }
472 } 472 }
473 473
474 void ProfileSyncService::UnregisterInvalidationHandler( 474 void ProfileSyncService::UnregisterInvalidationHandler(
475 syncer::InvalidationHandler* handler) { 475 syncer::InvalidationHandler* handler) {
476 invalidator_registrar_->UnregisterHandler(handler); 476 invalidator_registrar_->UnregisterHandler(handler);
477 } 477 }
478 478
479 void ProfileSyncService::AcknowledgeInvalidation(
480 const invalidation::ObjectId& id,
481 const syncer::AckHandle& ack_handle) {
482 // TODO(dcheng): This DCHECK is probably wrong.
483 DCHECK(backend_.get());
akalin 2012/10/19 13:27:16 you might have to check for backend_ and stash awa
dcheng 2012/10/19 19:38:11 Done.
484 backend_->AcknowledgeInvalidation(id, ack_handle);
485 }
486
479 syncer::InvalidatorState ProfileSyncService::GetInvalidatorState() const { 487 syncer::InvalidatorState ProfileSyncService::GetInvalidatorState() const {
480 return invalidator_registrar_->GetInvalidatorState(); 488 return invalidator_registrar_->GetInvalidatorState();
481 } 489 }
482 490
483 void ProfileSyncService::EmitInvalidationForTest( 491 void ProfileSyncService::EmitInvalidationForTest(
484 const invalidation::ObjectId& id, 492 const invalidation::ObjectId& id,
485 const std::string& payload) { 493 const std::string& payload) {
486 syncer::ObjectIdSet notify_ids; 494 syncer::ObjectIdSet notify_ids;
487 notify_ids.insert(id); 495 notify_ids.insert(id);
488 496
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru. 1873 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru.
1866 ProfileSyncService* old_this = this; 1874 ProfileSyncService* old_this = this;
1867 this->~ProfileSyncService(); 1875 this->~ProfileSyncService();
1868 new(old_this) ProfileSyncService( 1876 new(old_this) ProfileSyncService(
1869 new ProfileSyncComponentsFactoryImpl(profile, 1877 new ProfileSyncComponentsFactoryImpl(profile,
1870 CommandLine::ForCurrentProcess()), 1878 CommandLine::ForCurrentProcess()),
1871 profile, 1879 profile,
1872 signin, 1880 signin,
1873 behavior); 1881 behavior);
1874 } 1882 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698