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

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

Issue 3945003: Move useful printing backend code from chrome/service/cloud_print to printing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: resolve merge conflict Created 10 years, 2 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/printer_job_handler.h ('k') | printing/backend/cups_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/printer_job_handler.cc
===================================================================
--- chrome/service/cloud_print/printer_job_handler.cc (revision 63553)
+++ chrome/service/cloud_print/printer_job_handler.cc (working copy)
@@ -18,7 +18,7 @@
#include "net/http/http_response_headers.h"
PrinterJobHandler::PrinterJobHandler(
- const cloud_print::PrinterBasicInfo& printer_info,
+ const printing::PrinterBasicInfo& printer_info,
const PrinterInfoFromCloud& printer_info_cloud,
const std::string& auth_token,
const GURL& cloud_print_server_url,
@@ -45,7 +45,8 @@
}
bool PrinterJobHandler::Initialize() {
- if (print_system_->IsValidPrinter(printer_info_.printer_name)) {
+ if (print_system_->GetPrintBackend()->IsValidPrinter(
+ printer_info_.printer_name)) {
printer_watcher_ = print_system_->CreatePrinterWatcher(
printer_info_.printer_name);
printer_watcher_->StartWatching(this);
@@ -136,14 +137,14 @@
<< printer_info_cloud_.printer_id;
// We need to update the parts of the printer info that have changed
// (could be printer name, description, status or capabilities).
- cloud_print::PrinterBasicInfo printer_info;
+ printing::PrinterBasicInfo printer_info;
printer_watcher_->GetCurrentPrinterInfo(&printer_info);
- cloud_print::PrinterCapsAndDefaults printer_caps;
+ printing::PrinterCapsAndDefaults printer_caps;
std::string post_data;
std::string mime_boundary;
CloudPrintHelpers::CreateMimeBoundaryForUpload(&mime_boundary);
- if (print_system_->GetPrinterCapsAndDefaults(printer_info.printer_name,
- &printer_caps)) {
+ if (print_system_->GetPrintBackend()->GetPrinterCapsAndDefaults(
+ printer_info.printer_name, &printer_caps)) {
std::string caps_hash = MD5String(printer_caps.printer_capabilities);
if (caps_hash != printer_info_cloud_.caps_hash) {
// Hashes don't match, we need to upload new capabilities (the defaults
@@ -679,4 +680,3 @@
&PrinterJobHandler::JobFailed,
PRINT_FAILED));
}
-
« no previous file with comments | « chrome/service/cloud_print/printer_job_handler.h ('k') | printing/backend/cups_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698