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

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

Issue 1191393008: Introduce a layering in the invalidation component as public and impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Explicitly forbid content to prevent future additions Created 5 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/invalidation/fake_invalidation_handler.h"
6
7 namespace syncer {
8
9 FakeInvalidationHandler::FakeInvalidationHandler()
10 : state_(DEFAULT_INVALIDATION_ERROR),
11 invalidation_count_(0) {}
12
13 FakeInvalidationHandler::~FakeInvalidationHandler() {}
14
15 InvalidatorState FakeInvalidationHandler::GetInvalidatorState() const {
16 return state_;
17 }
18
19 const ObjectIdInvalidationMap&
20 FakeInvalidationHandler::GetLastInvalidationMap() const {
21 return last_invalidation_map_;
22 }
23
24 int FakeInvalidationHandler::GetInvalidationCount() const {
25 return invalidation_count_;
26 }
27
28 void FakeInvalidationHandler::OnInvalidatorStateChange(InvalidatorState state) {
29 state_ = state;
30 }
31
32 void FakeInvalidationHandler::OnIncomingInvalidation(
33 const ObjectIdInvalidationMap& invalidation_map) {
34 last_invalidation_map_ = invalidation_map;
35 ++invalidation_count_;
36 }
37
38 std::string FakeInvalidationHandler::GetOwnerName() const { return "Fake"; }
39
40 } // namespace syncer
OLDNEW
« no previous file with comments | « components/invalidation/fake_invalidation_handler.h ('k') | components/invalidation/fake_invalidation_state_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698