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

Side by Side Diff: remoting/protocol/jingle_session_manager.cc

Issue 2911893003: Deprecate NonThreadSafe in remoting in favor of SequenceChecker. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « remoting/protocol/jingle_session_manager.h ('k') | remoting/protocol/message_reader.h » ('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 "remoting/protocol/jingle_session_manager.h" 5 #include "remoting/protocol/jingle_session_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "remoting/protocol/authenticator.h" 10 #include "remoting/protocol/authenticator.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const SignalingAddress& peer_address, 49 const SignalingAddress& peer_address,
50 std::unique_ptr<Authenticator> authenticator) { 50 std::unique_ptr<Authenticator> authenticator) {
51 std::unique_ptr<JingleSession> session(new JingleSession(this)); 51 std::unique_ptr<JingleSession> session(new JingleSession(this));
52 session->StartConnection(peer_address, std::move(authenticator)); 52 session->StartConnection(peer_address, std::move(authenticator));
53 sessions_[session->session_id_] = session.get(); 53 sessions_[session->session_id_] = session.get();
54 return std::move(session); 54 return std::move(session);
55 } 55 }
56 56
57 void JingleSessionManager::set_authenticator_factory( 57 void JingleSessionManager::set_authenticator_factory(
58 std::unique_ptr<AuthenticatorFactory> authenticator_factory) { 58 std::unique_ptr<AuthenticatorFactory> authenticator_factory) {
59 DCHECK(CalledOnValidThread()); 59 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
60 authenticator_factory_ = std::move(authenticator_factory); 60 authenticator_factory_ = std::move(authenticator_factory);
61 } 61 }
62 62
63 void JingleSessionManager::OnSignalStrategyStateChange( 63 void JingleSessionManager::OnSignalStrategyStateChange(
64 SignalStrategy::State state) {} 64 SignalStrategy::State state) {}
65 65
66 bool JingleSessionManager::OnSignalStrategyIncomingStanza( 66 bool JingleSessionManager::OnSignalStrategyIncomingStanza(
67 const buzz::XmlElement* stanza) { 67 const buzz::XmlElement* stanza) {
68 if (!JingleMessage::IsJingleMessage(stanza)) 68 if (!JingleMessage::IsJingleMessage(stanza))
69 return false; 69 return false;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 signal_strategy_->SendStanza( 147 signal_strategy_->SendStanza(
148 JingleMessageReply(error).ToXml(original_stanza.get())); 148 JingleMessageReply(error).ToXml(original_stanza.get()));
149 } 149 }
150 150
151 void JingleSessionManager::SessionDestroyed(JingleSession* session) { 151 void JingleSessionManager::SessionDestroyed(JingleSession* session) {
152 sessions_.erase(session->session_id_); 152 sessions_.erase(session->session_id_);
153 } 153 }
154 154
155 } // namespace protocol 155 } // namespace protocol
156 } // namespace remoting 156 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_session_manager.h ('k') | remoting/protocol/message_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698