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

Side by Side Diff: components/invalidation/p2p_invalidation_service.cc

Issue 1146533005: [Sync] InvalidationService shouldn't CHECK when registering ObjectId for more than one handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from Bartosz. Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/invalidation/p2p_invalidation_service.h" 5 #include "components/invalidation/p2p_invalidation_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/invalidation/invalidation_service_util.h" 8 #include "components/invalidation/invalidation_service_util.h"
9 #include "components/invalidation/p2p_invalidator.h" 9 #include "components/invalidation/p2p_invalidator.h"
10 #include "google_apis/gaia/identity_provider.h" 10 #include "google_apis/gaia/identity_provider.h"
(...skipping 28 matching lines...) Expand all
39 void P2PInvalidationService::UpdateCredentials(const std::string& username, 39 void P2PInvalidationService::UpdateCredentials(const std::string& username,
40 const std::string& password) { 40 const std::string& password) {
41 invalidator_->UpdateCredentials(username, password); 41 invalidator_->UpdateCredentials(username, password);
42 } 42 }
43 43
44 void P2PInvalidationService::RegisterInvalidationHandler( 44 void P2PInvalidationService::RegisterInvalidationHandler(
45 syncer::InvalidationHandler* handler) { 45 syncer::InvalidationHandler* handler) {
46 invalidator_->RegisterHandler(handler); 46 invalidator_->RegisterHandler(handler);
47 } 47 }
48 48
49 void P2PInvalidationService::UpdateRegisteredInvalidationIds( 49 bool P2PInvalidationService::UpdateRegisteredInvalidationIds(
50 syncer::InvalidationHandler* handler, 50 syncer::InvalidationHandler* handler,
51 const syncer::ObjectIdSet& ids) { 51 const syncer::ObjectIdSet& ids) {
52 invalidator_->UpdateRegisteredIds(handler, ids); 52 return invalidator_->UpdateRegisteredIds(handler, ids);
53 } 53 }
54 54
55 void P2PInvalidationService::UnregisterInvalidationHandler( 55 void P2PInvalidationService::UnregisterInvalidationHandler(
56 syncer::InvalidationHandler* handler) { 56 syncer::InvalidationHandler* handler) {
57 invalidator_->UnregisterHandler(handler); 57 invalidator_->UnregisterHandler(handler);
58 } 58 }
59 59
60 void P2PInvalidationService::SendInvalidation( 60 void P2PInvalidationService::SendInvalidation(
61 const syncer::ObjectIdSet& ids) { 61 const syncer::ObjectIdSet& ids) {
62 invalidator_->SendInvalidation(ids); 62 invalidator_->SendInvalidation(ids);
(...skipping 15 matching lines...) Expand all
78 base::Callback<void(const base::DictionaryValue&)> caller) const { 78 base::Callback<void(const base::DictionaryValue&)> caller) const {
79 base::DictionaryValue value; 79 base::DictionaryValue value;
80 caller.Run(value); 80 caller.Run(value);
81 } 81 }
82 82
83 IdentityProvider* P2PInvalidationService::GetIdentityProvider() { 83 IdentityProvider* P2PInvalidationService::GetIdentityProvider() {
84 return identity_provider_.get(); 84 return identity_provider_.get();
85 } 85 }
86 86
87 } // namespace invalidation 87 } // namespace invalidation
OLDNEW
« no previous file with comments | « components/invalidation/p2p_invalidation_service.h ('k') | components/invalidation/p2p_invalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698