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

Unified Diff: chrome/service/cloud_print/cloud_print_connector.cc

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_connector.h ('k') | chrome/service/cloud_print/cloud_print_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/cloud_print_connector.cc
diff --git a/chrome/service/cloud_print/cloud_print_connector.cc b/chrome/service/cloud_print/cloud_print_connector.cc
index 87920171b93ac65ec8dd4d2cfc98961b2010b724..d374cc2410e3bfdcd2cda65702809468520432a7 100644
--- a/chrome/service/cloud_print/cloud_print_connector.cc
+++ b/chrome/service/cloud_print/cloud_print_connector.cc
@@ -90,11 +90,11 @@ void CloudPrintConnector::GetPrinterIds(std::list<std::string>* printer_ids) {
void CloudPrintConnector::RegisterPrinters(
const printing::PrinterList& printers) {
- if (!settings_.connect_new_printers() || !IsRunning())
+ if (!IsRunning())
return;
printing::PrinterList::const_iterator it;
for (it = printers.begin(); it != printers.end(); ++it) {
- if (!settings_.IsPrinterBlacklisted(it->printer_name))
+ if (settings_.ShouldConnect(it->printer_name))
AddPendingRegisterTask(*it);
}
}
@@ -212,7 +212,8 @@ CloudPrintConnector::HandlePrinterListResponse(
printer_data->GetString(kNameValue, &printer_name);
std::string printer_id;
printer_data->GetString(kIdValue, &printer_id);
- if (settings_.IsPrinterBlacklisted(printer_name)) {
+
+ if (!settings_.ShouldConnect(printer_name)) {
VLOG(1) << "CP_CONNECTOR: Deleting " << printer_name <<
" id: " << printer_id << " as blacklisted";
AddPendingDeleteTask(printer_id);
« no previous file with comments | « chrome/service/cloud_print/cloud_print_connector.h ('k') | chrome/service/cloud_print/cloud_print_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698