| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_ | |
| 6 #define CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "talk/base/cryptstring.h" | |
| 11 #include "talk/base/helpers.h" | |
| 12 | |
| 13 namespace notifier { | |
| 14 | |
| 15 class ConnectionOptions { | |
| 16 public: | |
| 17 ConnectionOptions(); | |
| 18 | |
| 19 bool autodetect_proxy() const { return autodetect_proxy_; } | |
| 20 bool auto_reconnect() const { return auto_reconnect_; } | |
| 21 const std::string& proxy_host() const { return proxy_host_; } | |
| 22 int proxy_port() const { return proxy_port_; } | |
| 23 bool use_proxy_auth() const { return use_proxy_auth_; } | |
| 24 const std::string& auth_user() const { return auth_user_; } | |
| 25 const talk_base::CryptString& auth_pass() const { return auth_pass_; } | |
| 26 bool allow_unverified_certs() const { return allow_unverified_certs_; } | |
| 27 | |
| 28 void set_autodetect_proxy(bool f) { autodetect_proxy_ = f; } | |
| 29 void set_auto_reconnect(bool f) { auto_reconnect_ = f; } | |
| 30 void set_proxy_host(const std::string& val) { proxy_host_ = val; } | |
| 31 void set_proxy_port(int val) { proxy_port_ = val; } | |
| 32 void set_use_proxy_auth(bool f) { use_proxy_auth_ = f; } | |
| 33 void set_auth_user(const std::string& val) { auth_user_ = val; } | |
| 34 void set_auth_pass(const talk_base::CryptString& val) { auth_pass_ = val; } | |
| 35 | |
| 36 // Setting this to true opens a security hole, so it is *highly* recommended | |
| 37 // that you don't do this. | |
| 38 void set_allow_unverified_certs(bool allow_unverified_certs) { | |
| 39 allow_unverified_certs_ = allow_unverified_certs; | |
| 40 } | |
| 41 | |
| 42 private: | |
| 43 bool autodetect_proxy_; | |
| 44 bool auto_reconnect_; | |
| 45 std::string proxy_host_; | |
| 46 int proxy_port_; | |
| 47 bool use_proxy_auth_; | |
| 48 std::string auth_user_; | |
| 49 talk_base::CryptString auth_pass_; | |
| 50 bool allow_unverified_certs_; | |
| 51 // Allow the copy constructor and operator=. | |
| 52 }; | |
| 53 | |
| 54 } // namespace notifier | |
| 55 | |
| 56 #endif // CHROME_BROWSER_SYNC_NOTIFIER_COMMUNICATOR_CONNECTION_OPTIONS_H_ | |
| OLD | NEW |