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

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

Issue 10378110: Verify that xmpp_login specified in the config matches auth token. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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
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/fake_signal_strategy.h" 5 #include "remoting/jingle_glue/fake_signal_strategy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void FakeSignalStrategy::Disconnect() { 45 void FakeSignalStrategy::Disconnect() {
46 DCHECK(CalledOnValidThread()); 46 DCHECK(CalledOnValidThread());
47 FOR_EACH_OBSERVER(Listener, listeners_, 47 FOR_EACH_OBSERVER(Listener, listeners_,
48 OnSignalStrategyStateChange(DISCONNECTED)); 48 OnSignalStrategyStateChange(DISCONNECTED));
49 } 49 }
50 50
51 SignalStrategy::State FakeSignalStrategy::GetState() const { 51 SignalStrategy::State FakeSignalStrategy::GetState() const {
52 return CONNECTED; 52 return CONNECTED;
53 } 53 }
54 54
55 SignalStrategy::Error FakeSignalStrategy::GetError() const {
56 return OK;
57 }
58
55 std::string FakeSignalStrategy::GetLocalJid() const { 59 std::string FakeSignalStrategy::GetLocalJid() const {
56 DCHECK(CalledOnValidThread()); 60 DCHECK(CalledOnValidThread());
57 return jid_; 61 return jid_;
58 } 62 }
59 63
60 void FakeSignalStrategy::AddListener(Listener* listener) { 64 void FakeSignalStrategy::AddListener(Listener* listener) {
61 DCHECK(CalledOnValidThread()); 65 DCHECK(CalledOnValidThread());
62 listeners_.AddObserver(listener); 66 listeners_.AddObserver(listener);
63 } 67 }
64 68
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 while ((listener = it.GetNext()) != NULL) { 114 while ((listener = it.GetNext()) != NULL) {
111 if (listener->OnSignalStrategyIncomingStanza(stanza)) 115 if (listener->OnSignalStrategyIncomingStanza(stanza))
112 break; 116 break;
113 } 117 }
114 118
115 pending_messages_.pop(); 119 pending_messages_.pop();
116 } 120 }
117 } 121 }
118 122
119 } // namespace remoting 123 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/fake_signal_strategy.h ('k') | remoting/jingle_glue/javascript_signal_strategy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698