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

Side by Side Diff: remoting/signaling/xmpp_signal_strategy.cc

Issue 982413002: base: Stop passing a non-const ref to ObserverListBase::Iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: observerref: fixwindowsbuild Created 5 years, 9 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
« no previous file with comments | « remoting/signaling/fake_signal_strategy.cc ('k') | ui/aura/window.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 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 "remoting/signaling/xmpp_signal_strategy.h" 5 #include "remoting/signaling/xmpp_signal_strategy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (!xmpp_client_) { 186 if (!xmpp_client_) {
187 // If the connection has been terminated then it doesn't matter 187 // If the connection has been terminated then it doesn't matter
188 // what Id we return. 188 // what Id we return.
189 return std::string(); 189 return std::string();
190 } 190 }
191 return xmpp_client_->NextId(); 191 return xmpp_client_->NextId();
192 } 192 }
193 193
194 bool XmppSignalStrategy::HandleStanza(const buzz::XmlElement* stanza) { 194 bool XmppSignalStrategy::HandleStanza(const buzz::XmlElement* stanza) {
195 DCHECK(CalledOnValidThread()); 195 DCHECK(CalledOnValidThread());
196 ObserverListBase<Listener>::Iterator it(listeners_); 196 ObserverListBase<Listener>::Iterator it(&listeners_);
197 Listener* listener; 197 Listener* listener;
198 while ((listener = it.GetNext()) != nullptr) { 198 while ((listener = it.GetNext()) != nullptr) {
199 if (listener->OnSignalStrategyIncomingStanza(stanza)) 199 if (listener->OnSignalStrategyIncomingStanza(stanza))
200 return true; 200 return true;
201 } 201 }
202 return false; 202 return false;
203 } 203 }
204 204
205 void XmppSignalStrategy::SetAuthInfo(const std::string& username, 205 void XmppSignalStrategy::SetAuthInfo(const std::string& username,
206 const std::string& auth_token) { 206 const std::string& auth_token) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 // static 266 // static
267 buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth( 267 buzz::PreXmppAuth* XmppSignalStrategy::CreatePreXmppAuth(
268 const buzz::XmppClientSettings& settings) { 268 const buzz::XmppClientSettings& settings) {
269 buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY); 269 buzz::Jid jid(settings.user(), settings.host(), buzz::STR_EMPTY);
270 return new notifier::GaiaTokenPreXmppAuth( 270 return new notifier::GaiaTokenPreXmppAuth(
271 jid.Str(), settings.auth_token(), settings.token_service(), "X-OAUTH2"); 271 jid.Str(), settings.auth_token(), settings.token_service(), "X-OAUTH2");
272 } 272 }
273 273
274 } // namespace remoting 274 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/signaling/fake_signal_strategy.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698