OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_SETTINGS_H_ | 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_SETTINGS_H_ |
6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_SETTINGS_H_ | 6 #define JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_SETTINGS_H_ |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "jingle/notifier/communicator/xmpp_connection_generator.h" | 9 #include "jingle/notifier/communicator/xmpp_connection_generator.h" |
10 #include "talk/base/scoped_ptr.h" | 10 #include "talk/base/scoped_ptr.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 struct ServerInformation; | 28 struct ServerInformation; |
29 | 29 |
30 class LoginSettings { | 30 class LoginSettings { |
31 public: | 31 public: |
32 LoginSettings(const buzz::XmppClientSettings& user_settings, | 32 LoginSettings(const buzz::XmppClientSettings& user_settings, |
33 const ConnectionOptions& options, | 33 const ConnectionOptions& options, |
34 net::HostResolver* host_resolver, | 34 net::HostResolver* host_resolver, |
35 net::CertVerifier* cert_verifier, | 35 net::CertVerifier* cert_verifier, |
36 ServerInformation* server_list, | 36 ServerInformation* server_list, |
37 int server_count, | 37 int server_count, |
38 bool try_ssltcp_first); | 38 bool try_ssltcp_first, |
| 39 const std::string& auth_mechanism); |
39 | 40 |
40 ~LoginSettings(); | 41 ~LoginSettings(); |
41 | 42 |
42 bool try_ssltcp_first() const { | 43 bool try_ssltcp_first() const { |
43 return try_ssltcp_first_; | 44 return try_ssltcp_first_; |
44 } | 45 } |
45 | 46 |
46 net::HostResolver* host_resolver() { | 47 net::HostResolver* host_resolver() { |
47 return host_resolver_; | 48 return host_resolver_; |
48 } | 49 } |
(...skipping 18 matching lines...) Expand all Loading... |
67 return user_settings_.get(); | 68 return user_settings_.get(); |
68 } | 69 } |
69 | 70 |
70 const ConnectionOptions& connection_options() const { | 71 const ConnectionOptions& connection_options() const { |
71 return *connection_options_.get(); | 72 return *connection_options_.get(); |
72 } | 73 } |
73 | 74 |
74 void set_server_override(const net::HostPortPair& server); | 75 void set_server_override(const net::HostPortPair& server); |
75 void clear_server_override(); | 76 void clear_server_override(); |
76 | 77 |
| 78 std::string auth_mechanism() const { |
| 79 return auth_mechanism_; |
| 80 } |
| 81 |
77 private: | 82 private: |
78 bool try_ssltcp_first_; | 83 bool try_ssltcp_first_; |
79 | 84 |
80 net::HostResolver* const host_resolver_; | 85 net::HostResolver* const host_resolver_; |
81 net::CertVerifier* const cert_verifier_; | 86 net::CertVerifier* const cert_verifier_; |
82 talk_base::scoped_array<ServerInformation> server_list_; | 87 talk_base::scoped_array<ServerInformation> server_list_; |
83 int server_count_; | 88 int server_count_; |
84 // Used to handle redirects | 89 // Used to handle redirects |
85 scoped_ptr<ServerInformation> server_override_; | 90 scoped_ptr<ServerInformation> server_override_; |
86 | 91 |
87 scoped_ptr<buzz::XmppClientSettings> user_settings_; | 92 scoped_ptr<buzz::XmppClientSettings> user_settings_; |
88 scoped_ptr<ConnectionOptions> connection_options_; | 93 scoped_ptr<ConnectionOptions> connection_options_; |
| 94 std::string auth_mechanism_; |
| 95 |
89 DISALLOW_COPY_AND_ASSIGN(LoginSettings); | 96 DISALLOW_COPY_AND_ASSIGN(LoginSettings); |
90 }; | 97 }; |
91 } // namespace notifier | 98 } // namespace notifier |
92 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_SETTINGS_H_ | 99 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_SETTINGS_H_ |
OLD | NEW |