diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-22 00:27:39 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-22 00:27:39 +0000 |
commit | 17577838ed95c5820579a89b9bf831cc7c016c78 (patch) | |
tree | ea97f35593914b1f3047ad9c7681ca0efd0ca9b0 /remoting/jingle_glue/xmpp_signal_strategy.h | |
parent | 31576fd35a7745b9b441560c4422a191f6ada73e (diff) | |
download | chromium_src-17577838ed95c5820579a89b9bf831cc7c016c78.zip chromium_src-17577838ed95c5820579a89b9bf831cc7c016c78.tar.gz chromium_src-17577838ed95c5820579a89b9bf831cc7c016c78.tar.bz2 |
Cleanup XmppSignalStrategy initialization
1. Folded credentials into XmppServerConfig
2. net::ClientSocketFactory is passed from outside of socket factory
3. Various other minor cleanup, particularly in JNI code.
BUG=274652
Review URL: https://chromiumcodereview.appspot.com/23020023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue/xmpp_signal_strategy.h')
-rw-r--r-- | remoting/jingle_glue/xmpp_signal_strategy.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/remoting/jingle_glue/xmpp_signal_strategy.h b/remoting/jingle_glue/xmpp_signal_strategy.h index 5220710..4ef6b70 100644 --- a/remoting/jingle_glue/xmpp_signal_strategy.h +++ b/remoting/jingle_glue/xmpp_signal_strategy.h @@ -22,6 +22,7 @@ #include "third_party/libjingle/source/talk/xmpp/xmppclient.h" namespace net { +class ClientSocketFactory; class URLRequestContextGetter; } // namespace net @@ -40,16 +41,21 @@ class XmppSignalStrategy : public base::NonThreadSafe, public: // XMPP Server configuration for XmppSignalStrategy. struct XmppServerConfig { + XmppServerConfig(); + ~XmppServerConfig(); + std::string host; int port; bool use_tls; + + std::string username; + std::string auth_token; + std::string auth_service; }; XmppSignalStrategy( + net::ClientSocketFactory* socket_factory, scoped_refptr<net::URLRequestContextGetter> request_context_getter, - const std::string& username, - const std::string& auth_token, - const std::string& auth_token_service, const XmppServerConfig& xmpp_server_config); virtual ~XmppSignalStrategy(); @@ -72,7 +78,7 @@ class XmppSignalStrategy : public base::NonThreadSafe, // CONNECTED state. It will be used on the next Connect() call. void SetAuthInfo(const std::string& username, const std::string& auth_token, - const std::string& auth_token_service); + const std::string& auth_service); // Use this method to override the default resource name used (optional). // This will be used on the next Connect() call. @@ -87,10 +93,8 @@ class XmppSignalStrategy : public base::NonThreadSafe, void SendKeepAlive(); + net::ClientSocketFactory* socket_factory_; scoped_refptr<net::URLRequestContextGetter> request_context_getter_; - std::string username_; - std::string auth_token_; - std::string auth_token_service_; std::string resource_name_; scoped_ptr<talk_base::TaskRunner> task_runner_; buzz::XmppClient* xmpp_client_; |