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

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

Issue 5846001: Making CUPS calls non-blocking.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « no previous file | printing/backend/print_backend_consts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/print_system_cups.cc
===================================================================
--- chrome/service/cloud_print/print_system_cups.cc (revision 69204)
+++ chrome/service/cloud_print/print_system_cups.cc (working copy)
@@ -31,13 +31,13 @@
#include "googleurl/src/gurl.h"
#include "printing/backend/cups_helper.h"
#include "printing/backend/print_backend.h"
+#include "printing/backend/print_backend_consts.h"
namespace {
static const char kCUPSPrinterInfoOpt[] = "printer-info";
static const char kCUPSPrinterStateOpt[] = "printer-state";
static const char kCUPSPrintServerURLs[] = "print_server_urls";
static const char kCUPSUpdateTimeoutMs[] = "update_timeout_ms";
-static const char kCUPSPrintBackendServerURL[] = "print_server_url";
// Default port for IPP print servers.
static const int kDefaultIPPServerPort = 631;
@@ -380,8 +380,11 @@
// Get Print backend for the specific print server.
DictionaryValue backend_settings;
- backend_settings.SetString(kCUPSPrintBackendServerURL, url);
+ backend_settings.SetString(kCUPSPrintServerURL, url);
+ // Make CUPS requests non-blocking.
+ backend_settings.SetString(kCUPSBlocking, kValueFalse);
+
PrintServerInfoCUPS print_server;
print_server.backend =
printing::PrintBackend::CreateInstance(&backend_settings);
@@ -622,6 +625,7 @@
return cupsPrintFile(name, filename, title, num_options, options);
} else {
printing::HttpConnectionCUPS http(url);
+ http.SetBlocking(false);
return cupsPrintFile2(http.http(), name, filename,
title, num_options, options);
}
@@ -633,6 +637,7 @@
return cupsGetJobs(jobs, name, myjobs, whichjobs);
} else {
printing::HttpConnectionCUPS http(url);
+ http.SetBlocking(false);
return cupsGetJobs2(http.http(), jobs, name, myjobs, whichjobs);
}
}
« no previous file with comments | « no previous file | printing/backend/print_backend_consts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698