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

Unified Diff: webrtc/p2p/base/transportdescriptionfactory.h

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/transportdescriptionfactory.h
diff --git a/webrtc/p2p/base/transportdescriptionfactory.h b/webrtc/p2p/base/transportdescriptionfactory.h
index 2bd86617ed6020cc4c9a1ecfc091c186bacdd7f1..b964baf21e37d934c2edb898cf5556b0e173abcd 100644
--- a/webrtc/p2p/base/transportdescriptionfactory.h
+++ b/webrtc/p2p/base/transportdescriptionfactory.h
@@ -11,6 +11,7 @@
#ifndef WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_
#define WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_
+#include "webrtc/base/scoped_ptr.h"
#include "webrtc/p2p/base/transportdescription.h"
namespace rtc {
@@ -34,12 +35,14 @@ class TransportDescriptionFactory {
TransportDescriptionFactory();
SecurePolicy secure() const { return secure_; }
// The identity to use when setting up DTLS.
- rtc::SSLIdentity* identity() const { return identity_; }
+ rtc::SSLIdentity* identity() const { return identity_.get(); }
// Specifies the transport security policy to use.
void set_secure(SecurePolicy s) { secure_ = s; }
// Specifies the identity to use (only used when secure is not SEC_DISABLED).
- void set_identity(rtc::SSLIdentity* identity) { identity_ = identity; }
+ void set_identity(rtc::SSLIdentity* identity) {
+ identity_.reset(identity->GetReference());
+ }
// Creates a transport description suitable for use in an offer.
TransportDescription* CreateOffer(const TransportOptions& options,
@@ -55,7 +58,7 @@ class TransportDescriptionFactory {
ConnectionRole role) const;
SecurePolicy secure_;
- rtc::SSLIdentity* identity_;
+ ::rtc::scoped_ptr<rtc::SSLIdentity> identity_;
};
} // namespace cricket

Powered by Google App Engine
This is Rietveld 408576698