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

Side by Side Diff: sync/notifier/fake_sync_notifier_observer.cc

Issue 10875064: Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to ToT for landing Created 8 years, 3 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
« no previous file with comments | « sync/notifier/fake_sync_notifier_observer.h ('k') | sync/notifier/invalidation_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sync/notifier/fake_sync_notifier_observer.h"
6
7 namespace syncer {
8
9 FakeSyncNotifierObserver::FakeSyncNotifierObserver()
10 : reason_(TRANSIENT_NOTIFICATION_ERROR),
11 last_source_(LOCAL_NOTIFICATION),
12 notification_count_(0) {}
13
14 FakeSyncNotifierObserver::~FakeSyncNotifierObserver() {}
15
16 NotificationsDisabledReason
17 FakeSyncNotifierObserver::GetNotificationsDisabledReason() const {
18 return reason_;
19 }
20
21 const ObjectIdStateMap&
22 FakeSyncNotifierObserver::GetLastNotificationIdStateMap() const {
23 return last_id_state_map_;
24 }
25
26 IncomingNotificationSource
27 FakeSyncNotifierObserver::GetLastNotificationSource() const {
28 return last_source_;
29 }
30
31 int FakeSyncNotifierObserver::GetNotificationCount() const {
32 return notification_count_;
33 }
34
35 void FakeSyncNotifierObserver::OnNotificationsEnabled() {
36 reason_ = NO_NOTIFICATION_ERROR;
37 }
38
39 void FakeSyncNotifierObserver::OnNotificationsDisabled(
40 NotificationsDisabledReason reason) {
41 reason_ = reason;
42 }
43
44 void FakeSyncNotifierObserver::OnIncomingNotification(
45 const ObjectIdStateMap& id_state_map,
46 IncomingNotificationSource source) {
47 last_id_state_map_ = id_state_map;
48 last_source_ = source;
49 ++notification_count_;
50 }
51
52 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/fake_sync_notifier_observer.h ('k') | sync/notifier/invalidation_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698