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

Side by Side Diff: components/invalidation/fake_invalidator.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/fake_invalidator.h" 5 #include "components/invalidation/fake_invalidator.h"
6 6
7 #include "components/invalidation/object_id_invalidation_map.h" 7 #include "components/invalidation/object_id_invalidation_map.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 10
(...skipping 24 matching lines...) Expand all
35 35
36 void FakeInvalidator::EmitOnIncomingInvalidation( 36 void FakeInvalidator::EmitOnIncomingInvalidation(
37 const ObjectIdInvalidationMap& invalidation_map) { 37 const ObjectIdInvalidationMap& invalidation_map) {
38 registrar_.DispatchInvalidationsToHandlers(invalidation_map); 38 registrar_.DispatchInvalidationsToHandlers(invalidation_map);
39 } 39 }
40 40
41 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) { 41 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) {
42 registrar_.RegisterHandler(handler); 42 registrar_.RegisterHandler(handler);
43 } 43 }
44 44
45 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, 45 bool FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler,
46 const ObjectIdSet& ids) { 46 const ObjectIdSet& ids) {
47 registrar_.UpdateRegisteredIds(handler, ids); 47 return registrar_.UpdateRegisteredIds(handler, ids);
48 } 48 }
49 49
50 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) { 50 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) {
51 registrar_.UnregisterHandler(handler); 51 registrar_.UnregisterHandler(handler);
52 } 52 }
53 53
54 InvalidatorState FakeInvalidator::GetInvalidatorState() const { 54 InvalidatorState FakeInvalidator::GetInvalidatorState() const {
55 return registrar_.GetInvalidatorState(); 55 return registrar_.GetInvalidatorState();
56 } 56 }
57 57
58 void FakeInvalidator::UpdateCredentials( 58 void FakeInvalidator::UpdateCredentials(
59 const std::string& email, const std::string& token) { 59 const std::string& email, const std::string& token) {
60 email_ = email; 60 email_ = email;
61 token_ = token; 61 token_ = token;
62 } 62 }
63 63
64 void FakeInvalidator::RequestDetailedStatus( 64 void FakeInvalidator::RequestDetailedStatus(
65 base::Callback<void(const base::DictionaryValue&)> callback) const { 65 base::Callback<void(const base::DictionaryValue&)> callback) const {
66 base::DictionaryValue value; 66 base::DictionaryValue value;
67 callback.Run(value); 67 callback.Run(value);
68 } 68 }
69 } // namespace syncer 69 } // namespace syncer
OLDNEW
« no previous file with comments | « components/invalidation/fake_invalidator.h ('k') | components/invalidation/invalidation_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698