Chromium Code Reviews| 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 25 matching lines...) Expand all Loading... | |
| 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 | 39 |
| 40 ~LoginSettings(); | 40 ~LoginSettings(); |
| 41 | 41 |
| 42 bool try_ssltcp_first() const { | 42 bool try_ssltcp_first() const { |
| 43 return try_ssltcp_first_; | 43 return try_ssltcp_first_; |
| 44 } | 44 } |
| 45 | 45 |
| 46 net::HostResolver* host_resolver() { | 46 net::HostResolver* host_resolver() const { |
|
akalin
2010/12/20 23:11:42
i don't think it makes sense for accessors of poin
wtc
2011/01/04 21:23:53
I know people have different opinions on this issu
| |
| 47 return host_resolver_; | 47 return host_resolver_; |
| 48 } | 48 } |
| 49 | 49 |
| 50 net::CertVerifier* cert_verifier() { | 50 net::CertVerifier* cert_verifier() const { |
| 51 return cert_verifier_; | 51 return cert_verifier_; |
| 52 } | 52 } |
| 53 | 53 |
| 54 const ServerInformation* server_list() const { | 54 const ServerInformation* server_list() const { |
| 55 return server_override_.get() ? server_override_.get() : server_list_.get(); | 55 return server_override_.get() ? server_override_.get() : server_list_.get(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 int server_count() const { | 58 int server_count() const { |
| 59 return server_override_.get() ? 1 : server_count_; | 59 return server_override_.get() ? 1 : server_count_; |
| 60 } | 60 } |
| 61 | 61 |
| 62 const buzz::XmppClientSettings& user_settings() const { | 62 const buzz::XmppClientSettings& user_settings() const { |
| 63 return *user_settings_.get(); | 63 return *user_settings_.get(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 buzz::XmppClientSettings* modifiable_user_settings() { | 66 buzz::XmppClientSettings* modifiable_user_settings() { |
| 67 return user_settings_.get(); | 67 return user_settings_.get(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 const ConnectionOptions& connection_options() const { | 70 const ConnectionOptions& connection_options() const { |
| 71 return *connection_options_.get(); | 71 return *connection_options_.get(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void set_server_override(const net::HostPortPair& server); | 74 void set_server_override(const net::HostPortPair& server); |
| 75 void clear_server_override(); | 75 void clear_server_override(); |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 bool try_ssltcp_first_; | 78 bool try_ssltcp_first_; |
| 79 | 79 |
| 80 net::HostResolver* host_resolver_; | 80 net::HostResolver* const host_resolver_; |
| 81 net::CertVerifier* cert_verifier_; | 81 net::CertVerifier* const cert_verifier_; |
| 82 talk_base::scoped_array<ServerInformation> server_list_; | 82 talk_base::scoped_array<ServerInformation> server_list_; |
| 83 int server_count_; | 83 int server_count_; |
| 84 // Used to handle redirects | 84 // Used to handle redirects |
| 85 scoped_ptr<ServerInformation> server_override_; | 85 scoped_ptr<ServerInformation> server_override_; |
| 86 | 86 |
| 87 scoped_ptr<buzz::XmppClientSettings> user_settings_; | 87 scoped_ptr<buzz::XmppClientSettings> user_settings_; |
| 88 scoped_ptr<ConnectionOptions> connection_options_; | 88 scoped_ptr<ConnectionOptions> connection_options_; |
| 89 DISALLOW_COPY_AND_ASSIGN(LoginSettings); | 89 DISALLOW_COPY_AND_ASSIGN(LoginSettings); |
| 90 }; | 90 }; |
| 91 } // namespace notifier | 91 } // namespace notifier |
| 92 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_SETTINGS_H_ | 92 #endif // JINGLE_NOTIFIER_COMMUNICATOR_LOGIN_SETTINGS_H_ |
| OLD | NEW |