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

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

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 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 | Annotate | Revision Log
« no previous file with comments | « sync/notifier/invalidation_notifier.h ('k') | sync/notifier/invalidation_notifier_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "sync/notifier/invalidation_notifier.h" 5 #include "sync/notifier/invalidation_notifier.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "jingle/notifier/listener/push_client.h" 10 #include "jingle/notifier/listener/push_client.h"
11 #include "net/url_request/url_request_context.h" 11 #include "net/url_request/url_request_context.h"
12 #include "sync/internal_api/public/syncable/model_type_payload_map.h" 12 #include "sync/internal_api/public/syncable/model_type_payload_map.h"
13 #include "sync/notifier/sync_notifier_observer.h" 13 #include "sync/notifier/sync_notifier_observer.h"
14 #include "talk/xmpp/jid.h" 14 #include "talk/xmpp/jid.h"
15 #include "talk/xmpp/xmppclientsettings.h" 15 #include "talk/xmpp/xmppclientsettings.h"
16 16
17 namespace csync { 17 namespace syncer {
18 18
19 InvalidationNotifier::InvalidationNotifier( 19 InvalidationNotifier::InvalidationNotifier(
20 scoped_ptr<notifier::PushClient> push_client, 20 scoped_ptr<notifier::PushClient> push_client,
21 const InvalidationVersionMap& initial_max_invalidation_versions, 21 const InvalidationVersionMap& initial_max_invalidation_versions,
22 const std::string& initial_invalidation_state, 22 const std::string& initial_invalidation_state,
23 const csync::WeakHandle<InvalidationStateTracker>& 23 const syncer::WeakHandle<InvalidationStateTracker>&
24 invalidation_state_tracker, 24 invalidation_state_tracker,
25 const std::string& client_info) 25 const std::string& client_info)
26 : state_(STOPPED), 26 : state_(STOPPED),
27 initial_max_invalidation_versions_(initial_max_invalidation_versions), 27 initial_max_invalidation_versions_(initial_max_invalidation_versions),
28 invalidation_state_tracker_(invalidation_state_tracker), 28 invalidation_state_tracker_(invalidation_state_tracker),
29 client_info_(client_info), 29 client_info_(client_info),
30 invalidation_state_(initial_invalidation_state), 30 invalidation_state_(initial_invalidation_state),
31 invalidation_client_(push_client.Pass()) { 31 invalidation_client_(push_client.Pass()) {
32 } 32 }
33 33
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 DCHECK(CalledOnValidThread()); 98 DCHECK(CalledOnValidThread());
99 // Do nothing. 99 // Do nothing.
100 } 100 }
101 101
102 void InvalidationNotifier::OnInvalidate( 102 void InvalidationNotifier::OnInvalidate(
103 const syncable::ModelTypePayloadMap& type_payloads) { 103 const syncable::ModelTypePayloadMap& type_payloads) {
104 DCHECK(CalledOnValidThread()); 104 DCHECK(CalledOnValidThread());
105 FOR_EACH_OBSERVER( 105 FOR_EACH_OBSERVER(
106 SyncNotifierObserver, observers_, 106 SyncNotifierObserver, observers_,
107 OnIncomingNotification(type_payloads, 107 OnIncomingNotification(type_payloads,
108 csync::REMOTE_NOTIFICATION)); 108 syncer::REMOTE_NOTIFICATION));
109 } 109 }
110 110
111 void InvalidationNotifier::OnNotificationsEnabled() { 111 void InvalidationNotifier::OnNotificationsEnabled() {
112 DCHECK(CalledOnValidThread()); 112 DCHECK(CalledOnValidThread());
113 FOR_EACH_OBSERVER(SyncNotifierObserver, observers_, 113 FOR_EACH_OBSERVER(SyncNotifierObserver, observers_,
114 OnNotificationsEnabled()); 114 OnNotificationsEnabled());
115 } 115 }
116 116
117 void InvalidationNotifier::OnNotificationsDisabled( 117 void InvalidationNotifier::OnNotificationsDisabled(
118 NotificationsDisabledReason reason) { 118 NotificationsDisabledReason reason) {
119 DCHECK(CalledOnValidThread()); 119 DCHECK(CalledOnValidThread());
120 FOR_EACH_OBSERVER(SyncNotifierObserver, observers_, 120 FOR_EACH_OBSERVER(SyncNotifierObserver, observers_,
121 OnNotificationsDisabled(reason)); 121 OnNotificationsDisabled(reason));
122 } 122 }
123 123
124 } // namespace csync 124 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/invalidation_notifier.h ('k') | sync/notifier/invalidation_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698