| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ |
| 6 #define CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool delete_on_enum_fail() const { | 37 bool delete_on_enum_fail() const { |
| 38 return delete_on_enum_fail_; | 38 return delete_on_enum_fail_; |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool connect_new_printers() const { | 41 bool connect_new_printers() const { |
| 42 return connect_new_printers_; | 42 return connect_new_printers_; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 bool xmpp_ping_enabled() const { |
| 46 return xmpp_ping_enabled_; |
| 47 } |
| 48 |
| 49 void set_xmpp_ping_enabled(bool enabled) { |
| 50 xmpp_ping_enabled_ = enabled; |
| 51 } |
| 52 |
| 53 int xmpp_ping_timeout_sec() const { |
| 54 return xmpp_ping_timeout_sec_; |
| 55 } |
| 56 |
| 45 const base::DictionaryValue* print_system_settings() const { | 57 const base::DictionaryValue* print_system_settings() const { |
| 46 return print_system_settings_.get(); | 58 return print_system_settings_.get(); |
| 47 }; | 59 }; |
| 48 | 60 |
| 49 bool IsPrinterBlacklisted(const std::string& name) const; | 61 bool IsPrinterBlacklisted(const std::string& name) const; |
| 50 | 62 |
| 63 void SetXmppPingTimeoutSec(int timeout); |
| 64 |
| 51 private: | 65 private: |
| 52 // Cloud Print server url. | 66 // Cloud Print server url. |
| 53 GURL server_url_; | 67 GURL server_url_; |
| 54 | 68 |
| 55 // This is initialized after a successful call to one of the Enable* methods. | 69 // This is initialized after a successful call to one of the Enable* methods. |
| 56 // It is not cleared in DisableUser. | 70 // It is not cleared in DisableUser. |
| 57 std::string proxy_id_; | 71 std::string proxy_id_; |
| 58 | 72 |
| 59 // If |true| printers that are not found locally will be deleted on GCP | 73 // If |true| printers that are not found locally will be deleted on GCP |
| 60 // even if the local enumeration failed. | 74 // even if the local enumeration failed. |
| 61 bool delete_on_enum_fail_; | 75 bool delete_on_enum_fail_; |
| 62 | 76 |
| 63 // If true register all new printers in cloud print. | 77 // If true register all new printers in cloud print. |
| 64 bool connect_new_printers_; | 78 bool connect_new_printers_; |
| 65 | 79 |
| 80 // Indicate if XMPP pings are enabled. |
| 81 bool xmpp_ping_enabled_; |
| 82 |
| 83 // Indicate timeout between XMPP pings. |
| 84 int xmpp_ping_timeout_sec_; |
| 85 |
| 66 // List of printers which should not be connected. | 86 // List of printers which should not be connected. |
| 67 std::set<std::string> printer_blacklist_; | 87 std::set<std::string> printer_blacklist_; |
| 68 | 88 |
| 69 // Print system settings. | 89 // Print system settings. |
| 70 scoped_ptr<base::DictionaryValue> print_system_settings_; | 90 scoped_ptr<base::DictionaryValue> print_system_settings_; |
| 71 | 91 |
| 72 DISALLOW_COPY_AND_ASSIGN(ConnectorSettings); | 92 DISALLOW_COPY_AND_ASSIGN(ConnectorSettings); |
| 73 }; | 93 }; |
| 74 | 94 |
| 75 #endif // CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ | 95 #endif // CHROME_SERVICE_CLOUD_PRINT_CONNECTOR_SETTINGS_H_ |
| 76 | 96 |
| OLD | NEW |