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

Issue 2891643002: Add a method to query IPP printers for attributes. (Closed)

Created:
3 years, 7 months ago by skau
Modified:
3 years, 6 months ago
Reviewers:
Lei Zhang, Carlson
CC:
chromium-reviews, oshima+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a method to query IPP printers for attributes. We determine if a printer can be configured without a PPD by checking the supported IPP version and some other attributes. Additionally, we fetch the printer-make-and-model that can be used to attempt to lookup a PPD. BUG=685676 Review-Url: https://codereview.chromium.org/2891643002 Cr-Commit-Position: refs/heads/master@{#478065} Committed: https://chromium.googlesource.com/chromium/src/+/bafbc3fe297223ffbef775053a1407910ce730e6

Patch Set 1 #

Total comments: 23

Patch Set 2 : fix compilation #

Total comments: 4

Patch Set 3 : add thread assertions #

Total comments: 16

Patch Set 4 : address comments #

Total comments: 6

Patch Set 5 : comments addressed #

Total comments: 5

Patch Set 6 : more robust parsing #

Patch Set 7 : remove statics #

Total comments: 10

Patch Set 8 : comments addressed #

Patch Set 9 : bug fixes and review comments #

Patch Set 10 : minor revision #

Total comments: 2

Patch Set 11 : check empty #

Unified diffs Side-by-side diffs Delta from patch set Stats (+359 lines, -17 lines) Patch
M chrome/browser/chromeos/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/printing/printer_info.h View 1 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/printing/printer_info_cups.cc View 1 2 3 4 5 6 7 8 9 1 chunk +140 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/printing/printer_info_stub.cc View 1 1 chunk +21 lines, -0 lines 0 comments Download
M printing/backend/cups_jobs.h View 1 2 3 4 3 chunks +34 lines, -0 lines 0 comments Download
M printing/backend/cups_jobs.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +129 lines, -17 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (11 generated)
skau
Can you take a first look?
3 years, 7 months ago (2017-05-17 01:07:04 UTC) #2
Carlson
https://codereview.chromium.org/2891643002/diff/1/chrome/browser/chromeos/printing/printer_info.h File chrome/browser/chromeos/printing/printer_info.h (right): https://codereview.chromium.org/2891643002/diff/1/chrome/browser/chromeos/printing/printer_info.h#newcode25 chrome/browser/chromeos/printing/printer_info.h:25: void QueryPrinter(const std::string& host, Function name should probably reflect ...
3 years, 7 months ago (2017-05-25 19:04:36 UTC) #3
skau
Thanks for the review. I've had a chance to pick this up again. PTAL. https://codereview.chromium.org/2891643002/diff/1/chrome/browser/chromeos/printing/printer_info.h ...
3 years, 6 months ago (2017-05-27 02:01:20 UTC) #6
Carlson
https://codereview.chromium.org/2891643002/diff/20001/printing/backend/cups_jobs.cc File printing/backend/cups_jobs.cc (right): https://codereview.chromium.org/2891643002/diff/20001/printing/backend/cups_jobs.cc#newcode331 printing/backend/cups_jobs.cc:331: DCHECK_EQ(IPP_TAG_TEXT, ippGetValueTag(attr)); Is DCHECK the right thing here? If ...
3 years, 6 months ago (2017-05-30 17:36:42 UTC) #7
skau
Added thread assertions. thestig@: PTAL printing/backend/* https://codereview.chromium.org/2891643002/diff/20001/printing/backend/cups_jobs.cc File printing/backend/cups_jobs.cc (right): https://codereview.chromium.org/2891643002/diff/20001/printing/backend/cups_jobs.cc#newcode331 printing/backend/cups_jobs.cc:331: DCHECK_EQ(IPP_TAG_TEXT, ippGetValueTag(attr)); On ...
3 years, 6 months ago (2017-05-31 00:01:21 UTC) #9
Lei Zhang
https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode77 chrome/browser/chromeos/printing/printer_info_cups.cc:77: // TODO(skau): Handle manufacturers with two word names. What ...
3 years, 6 months ago (2017-05-31 00:48:03 UTC) #10
skau
Thanks for the reviews. Comments addressed. PTAL. https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode77 chrome/browser/chromeos/printing/printer_info_cups.cc:77: // TODO(skau): ...
3 years, 6 months ago (2017-05-31 18:37:51 UTC) #11
Lei Zhang
https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode77 chrome/browser/chromeos/printing/printer_info_cups.cc:77: // TODO(skau): Handle manufacturers with two word names. On ...
3 years, 6 months ago (2017-05-31 23:00:03 UTC) #12
skau
PTAL https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode77 chrome/browser/chromeos/printing/printer_info_cups.cc:77: // TODO(skau): Handle manufacturers with two word names. ...
3 years, 6 months ago (2017-06-01 22:50:45 UTC) #13
Lei Zhang
https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/40001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode77 chrome/browser/chromeos/printing/printer_info_cups.cc:77: // TODO(skau): Handle manufacturers with two word names. On ...
3 years, 6 months ago (2017-06-01 23:25:11 UTC) #14
skau
PTAL. Unfortunately, we lack the data to solve the parsing issue completely right now. However, ...
3 years, 6 months ago (2017-06-02 23:58:36 UTC) #15
Carlson
https://codereview.chromium.org/2891643002/diff/80001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/80001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode26 chrome/browser/chromeos/printing/printer_info_cups.cc:26: static const std::vector<uint32_t>* kComponents = On 2017/06/02 23:58:36, skau ...
3 years, 6 months ago (2017-06-03 00:07:25 UTC) #16
Lei Zhang
https://codereview.chromium.org/2891643002/diff/80001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/80001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode26 chrome/browser/chromeos/printing/printer_info_cups.cc:26: static const std::vector<uint32_t>* kComponents = On 2017/06/02 23:58:36, skau ...
3 years, 6 months ago (2017-06-03 00:23:33 UTC) #17
skau
I took justin's suggestion and removed the statics. https://codereview.chromium.org/2891643002/diff/80001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/80001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode26 chrome/browser/chromeos/printing/printer_info_cups.cc:26: static ...
3 years, 6 months ago (2017-06-03 00:35:02 UTC) #18
Lei Zhang
The simpler check works for me. https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode55 chrome/browser/chromeos/printing/printer_info_cups.cc:55: DCHECK(version.IsValid()); How about ...
3 years, 6 months ago (2017-06-03 00:53:14 UTC) #19
Lei Zhang
https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode28 chrome/browser/chromeos/printing/printer_info_cups.cc:28: const std::array<base::StringPiece, 4> kMultiWordManufacturers{ Oh, you can't use StringPiece ...
3 years, 6 months ago (2017-06-03 01:17:14 UTC) #20
skau
Comments addressed. PTAL. https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode28 chrome/browser/chromeos/printing/printer_info_cups.cc:28: const std::array<base::StringPiece, 4> kMultiWordManufacturers{ On 2017/06/03 ...
3 years, 6 months ago (2017-06-05 19:51:04 UTC) #21
Lei Zhang
https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode116 chrome/browser/chromeos/printing/printer_info_cups.cc:116: // If there's only one word or an empty ...
3 years, 6 months ago (2017-06-06 22:02:37 UTC) #22
skau
Thanks for the reviews. PTAL. Sorry for the delay. https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc File chrome/browser/chromeos/printing/printer_info_cups.cc (right): https://codereview.chromium.org/2891643002/diff/120001/chrome/browser/chromeos/printing/printer_info_cups.cc#newcode116 chrome/browser/chromeos/printing/printer_info_cups.cc:116: ...
3 years, 6 months ago (2017-06-07 22:23:36 UTC) #23
Lei Zhang
https://codereview.chromium.org/2891643002/diff/180001/printing/backend/cups_jobs.cc File printing/backend/cups_jobs.cc (right): https://codereview.chromium.org/2891643002/diff/180001/printing/backend/cups_jobs.cc#newcode387 printing/backend/cups_jobs.cc:387: resource_path.front() == '/' ? resource_path : "/" + resource_path; ...
3 years, 6 months ago (2017-06-07 22:29:28 UTC) #24
skau
https://codereview.chromium.org/2891643002/diff/180001/printing/backend/cups_jobs.cc File printing/backend/cups_jobs.cc (right): https://codereview.chromium.org/2891643002/diff/180001/printing/backend/cups_jobs.cc#newcode387 printing/backend/cups_jobs.cc:387: resource_path.front() == '/' ? resource_path : "/" + resource_path; ...
3 years, 6 months ago (2017-06-07 22:41:35 UTC) #25
Lei Zhang
lgtm
3 years, 6 months ago (2017-06-07 22:44:56 UTC) #26
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/2891643002/200001
3 years, 6 months ago (2017-06-08 20:01:16 UTC) #32
commit-bot: I haz the power
3 years, 6 months ago (2017-06-08 20:07:39 UTC) #35
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/bafbc3fe297223ffbef775053a14...

Powered by Google App Engine
This is Rietveld 408576698