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

Side by Side Diff: remoting/jingle_glue/javascript_signal_strategy.cc

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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 "remoting/jingle_glue/javascript_signal_strategy.h" 5 #include "remoting/jingle_glue/javascript_signal_strategy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 22 matching lines...) Expand all
33 DCHECK(CalledOnValidThread()); 33 DCHECK(CalledOnValidThread());
34 34
35 xmpp_proxy_->AttachCallback(AsWeakPtr()); 35 xmpp_proxy_->AttachCallback(AsWeakPtr());
36 FOR_EACH_OBSERVER(Listener, listeners_, 36 FOR_EACH_OBSERVER(Listener, listeners_,
37 OnSignalStrategyStateChange(CONNECTED)); 37 OnSignalStrategyStateChange(CONNECTED));
38 } 38 }
39 39
40 void JavascriptSignalStrategy::Disconnect() { 40 void JavascriptSignalStrategy::Disconnect() {
41 DCHECK(CalledOnValidThread()); 41 DCHECK(CalledOnValidThread());
42 42
43 if (xmpp_proxy_) 43 if (xmpp_proxy_.get())
44 xmpp_proxy_->DetachCallback(); 44 xmpp_proxy_->DetachCallback();
45 FOR_EACH_OBSERVER(Listener, listeners_, 45 FOR_EACH_OBSERVER(Listener, listeners_,
46 OnSignalStrategyStateChange(DISCONNECTED)); 46 OnSignalStrategyStateChange(DISCONNECTED));
47 } 47 }
48 48
49 SignalStrategy::State JavascriptSignalStrategy::GetState() const { 49 SignalStrategy::State JavascriptSignalStrategy::GetState() const {
50 DCHECK(CalledOnValidThread()); 50 DCHECK(CalledOnValidThread());
51 // TODO(sergeyu): Extend XmppProxy to provide status of the 51 // TODO(sergeyu): Extend XmppProxy to provide status of the
52 // connection. 52 // connection.
53 return CONNECTED; 53 return CONNECTED;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 ObserverListBase<Listener>::Iterator it(listeners_); 98 ObserverListBase<Listener>::Iterator it(listeners_);
99 Listener* listener; 99 Listener* listener;
100 while ((listener = it.GetNext()) != NULL) { 100 while ((listener = it.GetNext()) != NULL) {
101 if (listener->OnSignalStrategyIncomingStanza(stanza.get())) 101 if (listener->OnSignalStrategyIncomingStanza(stanza.get()))
102 break; 102 break;
103 } 103 }
104 } 104 }
105 105
106 } // namespace remoting 106 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/chromium_socket_factory.cc ('k') | remoting/protocol/authenticator_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698