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

Issue 2105463002: Create a new print backend for the updated CUPS APIs (Closed)

Created:
4 years, 5 months ago by skau
Modified:
4 years, 5 months ago
Reviewers:
Lei Zhang, briannorris
CC:
chromium-reviews, adlr
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement a new backend for modern CUPS implementations As of CUPS 1.6, CUPS has moved away from PPD attributes to IPP attributes. This new backend uses the IPP APIs and will be better suited to use with CUPS going forward. Until we can bump our minumum CUPS version to 1.7, the only client will be Chrome OS where the version is 2.1.3. BUG=607668 TEST=With --enable-native-cups enabled, print dialog will show available CUPS printers if any are configured. Committed: https://crrev.com/b779ce61d5369a930af480c265c0c5b924888914 Cr-Commit-Position: refs/heads/master@{#407011}

Patch Set 1 #

Patch Set 2 : Implement a new backend for modern CUPS implementations #

Patch Set 3 : Fix copyrights #

Patch Set 4 : Ready for review #

Patch Set 5 : typos #

Total comments: 8

Patch Set 6 : WeakPtrs #

Patch Set 7 : Fix printing gyp file. #

Total comments: 51

Patch Set 8 : rvalues are friends #

Patch Set 9 : lint #

Patch Set 10 : Fix comment. #

Total comments: 19

Patch Set 11 : convert deleters to structs #

Total comments: 10

Patch Set 12 : format unittests #

Patch Set 13 : Remove WeakPtr logic and require that the CupsConnection stick around. #

Patch Set 14 : update gyp #

Total comments: 30

Patch Set 15 : Really done #

Total comments: 4

Patch Set 16 : Fix typos. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1431 lines, -20 lines) Patch
M printing/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +27 lines, -7 lines 0 comments Download
A printing/backend/cups_connection.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +59 lines, -0 lines 0 comments Download
A printing/backend/cups_connection.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +137 lines, -0 lines 0 comments Download
A printing/backend/cups_deleters.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +29 lines, -0 lines 0 comments Download
A printing/backend/cups_deleters.cc View 1 2 3 4 5 6 7 1 chunk +21 lines, -0 lines 0 comments Download
A printing/backend/cups_ipp_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +50 lines, -0 lines 0 comments Download
A printing/backend/cups_ipp_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +298 lines, -0 lines 0 comments Download
A printing/backend/cups_ipp_util_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +193 lines, -0 lines 0 comments Download
A printing/backend/cups_printer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +141 lines, -0 lines 0 comments Download
A printing/backend/cups_printer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +240 lines, -0 lines 0 comments Download
M printing/backend/print_backend_chromeos.cc View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -6 lines 0 comments Download
A printing/backend/print_backend_cups_ipp.h View 1 2 3 4 5 6 7 8 1 chunk +42 lines, -0 lines 0 comments Download
A printing/backend/print_backend_cups_ipp.cc View 1 2 3 4 5 6 7 8 1 chunk +153 lines, -0 lines 0 comments Download
M printing/printing.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +29 lines, -7 lines 0 comments Download

Messages

Total messages: 36 (17 generated)
skau
This is the implementation of the new CUPS backend. The CL is a bit large. ...
4 years, 5 months ago (2016-07-08 00:45:39 UTC) #4
Lei Zhang
I only took a quick glance. BTW, if you think the code is ready, you ...
4 years, 5 months ago (2016-07-08 01:19:50 UTC) #5
skau
Thanks for the review. I've addressed the comments. I'm hoping that the design is generally ...
4 years, 5 months ago (2016-07-08 21:24:09 UTC) #6
Lei Zhang
Getting around to taking a look. https://codereview.chromium.org/2105463002/diff/120001/printing/BUILD.gn File printing/BUILD.gn (right): https://codereview.chromium.org/2105463002/diff/120001/printing/BUILD.gn#newcode174 printing/BUILD.gn:174: "backend/cups_connection.cc", Can we ...
4 years, 5 months ago (2016-07-13 00:34:27 UTC) #7
Lei Zhang
https://codereview.chromium.org/2105463002/diff/120001/printing/backend/cups_connection.cc File printing/backend/cups_connection.cc (right): https://codereview.chromium.org/2105463002/diff/120001/printing/backend/cups_connection.cc#newcode20 printing/backend/cups_connection.cc:20: cupsFreeDests(1, dest); Can |dests_| be: std::vector<std::unique_ptr<cups_dest_t*, DestinationDeleter>> ? Then ...
4 years, 5 months ago (2016-07-13 01:08:43 UTC) #8
Lei Zhang
https://codereview.chromium.org/2105463002/diff/120001/printing/backend/cups_printer.h File printing/backend/cups_printer.h (right): https://codereview.chromium.org/2105463002/diff/120001/printing/backend/cups_printer.h#newcode92 printing/backend/cups_printer.h:92: bool StreamData(char* buffer, int len); Can this take a ...
4 years, 5 months ago (2016-07-13 01:32:04 UTC) #9
skau
Thanks for the thorough review. Comments have been addressed. PTAL. Ping me if you want ...
4 years, 5 months ago (2016-07-14 20:43:06 UTC) #10
skau
Friendly ping. :)
4 years, 5 months ago (2016-07-18 17:40:58 UTC) #15
Lei Zhang
A bit backlogged here. I'll finish reviewing in the afternoon. https://codereview.chromium.org/2105463002/diff/120001/printing/BUILD.gn File printing/BUILD.gn (right): https://codereview.chromium.org/2105463002/diff/120001/printing/BUILD.gn#newcode174 ...
4 years, 5 months ago (2016-07-19 19:32:58 UTC) #16
Lei Zhang
Just thinking about the object lifetimes now... https://codereview.chromium.org/2105463002/diff/180001/printing/backend/cups_connection.cc File printing/backend/cups_connection.cc (right): https://codereview.chromium.org/2105463002/diff/180001/printing/backend/cups_connection.cc#newcode34 printing/backend/cups_connection.cc:34: std::vector<std::unique_ptr<cups_dest_t, printing::DestinationDeleter>>& ...
4 years, 5 months ago (2016-07-19 22:26:39 UTC) #17
Lei Zhang
https://codereview.chromium.org/2105463002/diff/120001/printing/backend/cups_connection.h File printing/backend/cups_connection.h (right): https://codereview.chromium.org/2105463002/diff/120001/printing/backend/cups_connection.h#newcode61 printing/backend/cups_connection.h:61: base::WeakPtr<http_t> GetHttp(); On 2016/07/14 20:43:05, skau wrote: > On ...
4 years, 5 months ago (2016-07-19 22:49:17 UTC) #18
skau
Comments addressed. Added some tests and documented the lifetime requirements for CupsPrinter. https://codereview.chromium.org/2105463002/diff/120001/printing/backend/cups_connection.h File printing/backend/cups_connection.h ...
4 years, 5 months ago (2016-07-20 23:58:23 UTC) #21
Lei Zhang
I think it's gonna be mostly nits from here onwards. https://codereview.chromium.org/2105463002/diff/260001/printing/backend/cups_connection.cc File printing/backend/cups_connection.cc (right): https://codereview.chromium.org/2105463002/diff/260001/printing/backend/cups_connection.cc#newcode80 ...
4 years, 5 months ago (2016-07-21 00:46:20 UTC) #22
skau
Comments addressed. PTAL. https://codereview.chromium.org/2105463002/diff/260001/printing/backend/cups_connection.cc File printing/backend/cups_connection.cc (right): https://codereview.chromium.org/2105463002/diff/260001/printing/backend/cups_connection.cc#newcode80 printing/backend/cups_connection.cc:80: http_t* connection = On 2016/07/21 00:46:19, ...
4 years, 5 months ago (2016-07-21 20:07:34 UTC) #25
Lei Zhang
lgtm, thanks for addressing all the nitty gritty bits. https://codereview.chromium.org/2105463002/diff/280001/printing/backend/cups_ipp_util.h File printing/backend/cups_ipp_util.h (right): https://codereview.chromium.org/2105463002/diff/280001/printing/backend/cups_ipp_util.h#newcode31 printing/backend/cups_ipp_util.h:31: ...
4 years, 5 months ago (2016-07-21 20:31:31 UTC) #26
skau
Thank you very much. All done. https://codereview.chromium.org/2105463002/diff/280001/printing/backend/cups_ipp_util.h File printing/backend/cups_ipp_util.h (right): https://codereview.chromium.org/2105463002/diff/280001/printing/backend/cups_ipp_util.h#newcode31 printing/backend/cups_ipp_util.h:31: // extremeties of ...
4 years, 5 months ago (2016-07-21 23:33:10 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2105463002/300001
4 years, 5 months ago (2016-07-21 23:35:11 UTC) #32
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 5 months ago (2016-07-22 03:17:04 UTC) #34
commit-bot: I haz the power
4 years, 5 months ago (2016-07-22 03:19:51 UTC) #36
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/b779ce61d5369a930af480c265c0c5b924888914
Cr-Commit-Position: refs/heads/master@{#407011}

Powered by Google App Engine
This is Rietveld 408576698