forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move PseudoTCP and channel auth out of LibjingleTransportFactory.
Previously TransportFactory interface was responsible for creation and initialization of several protocol layers, including PseudoTCP and authentication (TLS). Simplified it so now it only creates raw datagram transport channel. PseudoTcpChannelFactory is now responsible for setting up PseudoTcpAdapter and AuthenticatingChannelFactory takes care of channel authentication. Also added DatagramChannelFactory for Datagram channels. This change will make it possible to replace PseudoTcpChannelFactory with an object that creates SCTP-based channels. Also fixed a bug in SslHmacChannelAuthenticator. It wasn't working properly when deleted from the callback. (base::Callback objects shouldn't be deleted while being called because when deleted they also destroy reference parameters values they are holding). BUG=402993 Review URL: https://codereview.chromium.org/551173004 Cr-Commit-Position: refs/heads/master@{#294474}
- Loading branch information
1 parent
042e7e0
commit 28d886c
Showing
34 changed files
with
555 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef REMOTING_PROTOCOL_DATAGRAM_CHANNEL_FACTORY_H_ | ||
#define REMOTING_PROTOCOL_DATAGRAM_CHANNEL_FACTORY_H_ | ||
|
||
namespace net { | ||
class Socket; | ||
} // namespace net | ||
|
||
namespace remoting { | ||
namespace protocol { | ||
|
||
class DatagramChannelFactory { | ||
public: | ||
typedef base::Callback<void(scoped_ptr<net::Socket>)> | ||
ChannelCreatedCallback; | ||
|
||
DatagramChannelFactory() {} | ||
|
||
// Creates new channels and calls the |callback| when then new channel is | ||
// created and connected. The |callback| is called with NULL if channel setup | ||
// failed for any reason. Callback may be called synchronously, before the | ||
// call returns. All channels must be destroyed, and CancelChannelCreation() | ||
// called for any pending channels, before the factory is destroyed. | ||
virtual void CreateChannel(const std::string& name, | ||
const ChannelCreatedCallback& callback) = 0; | ||
|
||
// Cancels a pending CreateChannel() operation for the named channel. If the | ||
// channel creation already completed then canceling it has no effect. When | ||
// shutting down this method must be called for each channel pending creation. | ||
virtual void CancelChannelCreation(const std::string& name) = 0; | ||
|
||
protected: | ||
virtual ~DatagramChannelFactory() {} | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(DatagramChannelFactory); | ||
}; | ||
|
||
} // namespace protocol | ||
} // namespace remoting | ||
|
||
#endif // REMOTING_PROTOCOL_DATAGRAM_CHANNEL_FACTORY_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.