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

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

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/sync/notifier/invalidation_notifier.h" 5 #include "chrome/browser/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 "chrome/browser/sync/notifier/sync_notifier_observer.h" 9 #include "chrome/browser/sync/notifier/sync_notifier_observer.h"
10 #include "chrome/browser/sync/protocol/service_constants.h" 10 #include "chrome/browser/sync/protocol/service_constants.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 notifier_options_.request_context_getter, 85 notifier_options_.request_context_getter,
86 notifier::GetServerList(notifier_options_), 86 notifier::GetServerList(notifier_options_),
87 notifier_options_.try_ssltcp_first, 87 notifier_options_.try_ssltcp_first,
88 notifier_options_.auth_mechanism)); 88 notifier_options_.auth_mechanism));
89 login_->StartConnection(); 89 login_->StartConnection();
90 state_ = CONNECTING; 90 state_ = CONNECTING;
91 } 91 }
92 } 92 }
93 93
94 void InvalidationNotifier::UpdateEnabledTypes( 94 void InvalidationNotifier::UpdateEnabledTypes(
95 syncable::ModelEnumSet enabled_types) { 95 syncable::ModelTypeSet enabled_types) {
96 DCHECK(non_thread_safe_.CalledOnValidThread()); 96 DCHECK(non_thread_safe_.CalledOnValidThread());
97 CHECK(!invalidation_client_id_.empty()); 97 CHECK(!invalidation_client_id_.empty());
98 invalidation_client_.RegisterTypes(enabled_types); 98 invalidation_client_.RegisterTypes(enabled_types);
99 } 99 }
100 100
101 void InvalidationNotifier::SendNotification( 101 void InvalidationNotifier::SendNotification(
102 syncable::ModelEnumSet changed_types) { 102 syncable::ModelTypeSet changed_types) {
103 DCHECK(non_thread_safe_.CalledOnValidThread()); 103 DCHECK(non_thread_safe_.CalledOnValidThread());
104 // Do nothing. 104 // Do nothing.
105 } 105 }
106 106
107 void InvalidationNotifier::OnConnect( 107 void InvalidationNotifier::OnConnect(
108 base::WeakPtr<buzz::XmppTaskParentInterface> base_task) { 108 base::WeakPtr<buzz::XmppTaskParentInterface> base_task) {
109 DCHECK(non_thread_safe_.CalledOnValidThread()); 109 DCHECK(non_thread_safe_.CalledOnValidThread());
110 DVLOG(1) << "OnConnect"; 110 DVLOG(1) << "OnConnect";
111 if (state_ >= STARTED) { 111 if (state_ >= STARTED) {
112 invalidation_client_.ChangeBaseTask(base_task); 112 invalidation_client_.ChangeBaseTask(base_task);
(...skipping 28 matching lines...) Expand all
141 OnNotificationStateChange(has_session)); 141 OnNotificationStateChange(has_session));
142 } 142 }
143 143
144 void InvalidationNotifier::WriteState(const std::string& state) { 144 void InvalidationNotifier::WriteState(const std::string& state) {
145 DCHECK(non_thread_safe_.CalledOnValidThread()); 145 DCHECK(non_thread_safe_.CalledOnValidThread());
146 DVLOG(1) << "WriteState"; 146 DVLOG(1) << "WriteState";
147 FOR_EACH_OBSERVER(SyncNotifierObserver, observers_, StoreState(state)); 147 FOR_EACH_OBSERVER(SyncNotifierObserver, observers_, StoreState(state));
148 } 148 }
149 149
150 } // namespace sync_notifier 150 } // namespace sync_notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698