Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5949)

Unified Diff: chrome/service/cloud_print/connector_settings.h

Issue 14215009: Changed cloud print private API to pass all page settings as single object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy.cc ('k') | chrome/service/cloud_print/connector_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/connector_settings.h
diff --git a/chrome/service/cloud_print/connector_settings.h b/chrome/service/cloud_print/connector_settings.h
index 94aa841b0227fd31aa11b5644c3da3608c722973..758e1013d20d8c5528dc306e5d0b915885e155e2 100644
--- a/chrome/service/cloud_print/connector_settings.h
+++ b/chrome/service/cloud_print/connector_settings.h
@@ -8,6 +8,7 @@
#include <set>
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
@@ -40,18 +41,10 @@ class ConnectorSettings {
return delete_on_enum_fail_;
}
- bool connect_new_printers() const {
- return connect_new_printers_;
- };
-
bool xmpp_ping_enabled() const {
return xmpp_ping_enabled_;
}
- void set_xmpp_ping_enabled(bool enabled) {
- xmpp_ping_enabled_ = enabled;
- }
-
int xmpp_ping_timeout_sec() const {
return xmpp_ping_timeout_sec_;
}
@@ -60,11 +53,18 @@ class ConnectorSettings {
return print_system_settings_.get();
};
- bool IsPrinterBlacklisted(const std::string& name) const;
+ bool ShouldConnect(const std::string& printer_name) const;
+
+ private:
+ friend class ConnectorSettingsTest;
+ FRIEND_TEST_ALL_PREFIXES(ConnectorSettingsTest, SettersTest);
+
+ void set_xmpp_ping_enabled(bool enabled) {
+ xmpp_ping_enabled_ = enabled;
+ }
void SetXmppPingTimeoutSec(int timeout);
- private:
// Cloud Print server url.
GURL server_url_;
@@ -85,8 +85,9 @@ class ConnectorSettings {
// Indicate timeout between XMPP pings.
int xmpp_ping_timeout_sec_;
- // List of printers which should not be connected.
- std::set<std::string> printer_blacklist_;
+ // Black list if connect_new_printers_ is true, or whitelist if false.
+ typedef std::set<std::string> Printers;
+ Printers printers_;
// Print system settings.
scoped_ptr<base::DictionaryValue> print_system_settings_;
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy.cc ('k') | chrome/service/cloud_print/connector_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698