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

Issue 2613683004: Completely rewrite the PpdProvider/PpdCache to use the SCS backend. Along the way, clean it up a l… (Closed)

Created:
3 years, 11 months ago by Carlson
Modified:
3 years, 10 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, rbpotter
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rewrite the PpdProvider/PpdCache to use the SCS backend. Along the way, clean it up a lot based on lessons learned from my first chromium code. Note this changes PpdReference to use just a single "effective_make_and_model" field to resolve ppds from the ppd server. This closely mirrors what's usually available from IPP and other sources, so seems to be the most sensible key for doing ppd lookups. This also updates all callsites and cascading changes to make the provider changes work. BUG=617253 R=skau CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2613683004 Cr-Commit-Position: refs/heads/master@{#448100} Committed: https://chromium.googlesource.com/chromium/src/+/2fc4d82bfb5950942d8ac1548fa8cb8c4222dad6

Patch Set 1 #

Total comments: 20

Patch Set 2 : Major API change to better fit usage from the UI, intergration with the rest of the codebase #

Patch Set 3 : Plumb through rest of changes, address skau comments. #

Total comments: 28

Patch Set 4 : Address latest skau comments, rebase and make it work with recent sync changes #

Total comments: 2

Patch Set 5 : Add file:/// handling, address other comments. #

Patch Set 6 : Remove ability to fetch network ppds for user supplied ppds. #

Patch Set 7 : Fixup unit specifics_translation unittest #

Total comments: 3

Patch Set 8 : Convert proto to old and busted field deprecation syntax since new hotness is not available on andr… #

Patch Set 9 : Fixup one more unit test #

Total comments: 14

Patch Set 10 : Address michealpg@ comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1516 lines, -1190 lines) Patch
M chrome/browser/chromeos/printing/ppd_provider_factory.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/printing/ppd_provider_factory.cc View 1 2 3 4 1 chunk +10 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/printing/specifics_translation.cc View 1 2 3 2 chunks +4 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/printing/specifics_translation_unittest.cc View 1 2 3 4 5 6 7 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/printer_backend_proxy_chromeos.cc View 1 2 3 chunks +31 lines, -21 lines 0 comments Download
M chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h View 1 2 3 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc View 1 2 3 4 5 6 7 8 9 7 chunks +82 lines, -72 lines 0 comments Download
M chromeos/printing/ppd_cache.h View 1 2 3 4 2 chunks +31 lines, -51 lines 0 comments Download
M chromeos/printing/ppd_cache.cc View 1 2 3 4 4 chunks +113 lines, -244 lines 0 comments Download
M chromeos/printing/ppd_cache_unittest.cc View 2 chunks +54 lines, -137 lines 0 comments Download
M chromeos/printing/ppd_provider.h View 1 2 3 4 2 chunks +65 lines, -55 lines 0 comments Download
M chromeos/printing/ppd_provider.cc View 1 2 3 4 5 2 chunks +678 lines, -346 lines 0 comments Download
M chromeos/printing/ppd_provider_unittest.cc View 1 2 3 4 5 3 chunks +382 lines, -191 lines 0 comments Download
M chromeos/printing/printer_configuration.h View 1 2 3 4 5 1 chunk +8 lines, -14 lines 0 comments Download
M chromeos/printing/printer_translator.cc View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -8 lines 0 comments Download
M chromeos/printing/printer_translator_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +5 lines, -12 lines 0 comments Download
A chromeos/printing/printing_constants.h View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
M components/sync/protocol/printer_specifics.proto View 1 2 3 4 5 6 7 1 chunk +7 lines, -3 lines 0 comments Download
M components/sync/protocol/proto_visitors.h View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 61 (33 generated)
Carlson
3 years, 11 months ago (2017-01-05 00:34:14 UTC) #1
skau
Generally looks good. Since the PPDProvider returns contents now, did you figure out how to ...
3 years, 11 months ago (2017-01-05 20:38:46 UTC) #2
Carlson
I haven't re-tested this since some other changes went in, but will do that shortly. ...
3 years, 11 months ago (2017-01-26 21:59:37 UTC) #4
skau
Looks like you have some stale documentation and a few places that need updating. https://codereview.chromium.org/2613683004/diff/40001/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc ...
3 years, 11 months ago (2017-01-27 01:37:06 UTC) #5
skau
https://codereview.chromium.org/2613683004/diff/40001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html (right): https://codereview.chromium.org/2613683004/diff/40001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html#newcode61 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html:61: <paper-icon-button suffix id="searchIcon" icon="cr:search" on-tap="onTap_" hidden> Can you put ...
3 years, 11 months ago (2017-01-27 01:38:09 UTC) #6
Carlson
https://codereview.chromium.org/2613683004/diff/40001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html File chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html (right): https://codereview.chromium.org/2613683004/diff/40001/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html#newcode61 chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html:61: <paper-icon-button suffix id="searchIcon" icon="cr:search" on-tap="onTap_" hidden> On 2017/01/27 01:38:09, ...
3 years, 10 months ago (2017-01-27 18:48:43 UTC) #7
skau
Looks good. I'll take another look after we fix up the call sites if we ...
3 years, 10 months ago (2017-01-27 19:16:10 UTC) #8
Carlson
Sorry, I think I wasn't clear earlier -- I edited my git commit log, but ...
3 years, 10 months ago (2017-01-27 22:36:20 UTC) #10
Carlson
https://codereview.chromium.org/2613683004/diff/40001/chromeos/printing/ppd_cache.cc File chromeos/printing/ppd_cache.cc (right): https://codereview.chromium.org/2613683004/diff/40001/chromeos/printing/ppd_cache.cc#newcode31 chromeos/printing/ppd_cache.cc:31: constexpr int kMaxCacheItemSize = 100 * 1024; On 2017/01/27 ...
3 years, 10 months ago (2017-01-27 22:56:22 UTC) #11
skau
lgtm
3 years, 10 months ago (2017-01-30 19:13:50 UTC) #12
Carlson
On 2017/01/30 19:13:50, skau wrote: > lgtm I had to fix up a unittest I ...
3 years, 10 months ago (2017-02-01 23:25:10 UTC) #19
skau
On 2017/02/01 23:25:10, Carlson wrote: > On 2017/01/30 19:13:50, skau wrote: > > lgtm > ...
3 years, 10 months ago (2017-02-01 23:43:21 UTC) #20
skau
skym@: Can you take a look to approve the components/sync changes?
3 years, 10 months ago (2017-02-01 23:43:46 UTC) #24
skau
https://codereview.chromium.org/2613683004/diff/120001/components/sync/protocol/printer_specifics.proto File components/sync/protocol/printer_specifics.proto (right): https://codereview.chromium.org/2613683004/diff/120001/components/sync/protocol/printer_specifics.proto#newcode22 components/sync/protocol/printer_specifics.proto:22: reserved 2 to 3; Sorry, it looks like they ...
3 years, 10 months ago (2017-02-01 23:45:14 UTC) #25
skym
https://codereview.chromium.org/2613683004/diff/120001/components/sync/protocol/printer_specifics.proto File components/sync/protocol/printer_specifics.proto (right): https://codereview.chromium.org/2613683004/diff/120001/components/sync/protocol/printer_specifics.proto#newcode22 components/sync/protocol/printer_specifics.proto:22: reserved 2 to 3; On 2017/02/01 23:45:14, skau wrote: ...
3 years, 10 months ago (2017-02-02 00:02:28 UTC) #26
Carlson
https://codereview.chromium.org/2613683004/diff/120001/components/sync/protocol/printer_specifics.proto File components/sync/protocol/printer_specifics.proto (right): https://codereview.chromium.org/2613683004/diff/120001/components/sync/protocol/printer_specifics.proto#newcode22 components/sync/protocol/printer_specifics.proto:22: reserved 2 to 3; On 2017/02/02 00:02:28, skym wrote: ...
3 years, 10 months ago (2017-02-02 01:48:58 UTC) #27
skym
lgtm
3 years, 10 months ago (2017-02-02 16:41:18 UTC) #32
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/2613683004/160001
3 years, 10 months ago (2017-02-02 18:34:04 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/355608)
3 years, 10 months ago (2017-02-02 18:42:13 UTC) #41
Carlson
dpapad@ can I ask you to look over the changes under chrome/browser/ui/webui? Thanks, -J
3 years, 10 months ago (2017-02-02 19:59:43 UTC) #43
dpapad
On 2017/02/02 at 19:59:43, justincarlson wrote: > dpapad@ can I ask you to look over ...
3 years, 10 months ago (2017-02-02 20:39:43 UTC) #44
Carlson
Per dpapad's suggestion: vitalybuka@ can you look over chrome/browser/ui/webui/print_preview/... michaelpg@ can you look over chrome/browser/ui/webui/settings/chromeos/... ...
3 years, 10 months ago (2017-02-02 20:41:56 UTC) #46
Vitaly Buka (NO REVIEWS)
chrome/browser/ui/webui/print_preview/ LGTM
3 years, 10 months ago (2017-02-02 21:52:59 UTC) #47
michaelpg
Please update the description first line and subject to be shorter (so it fits on ...
3 years, 10 months ago (2017-02-03 01:57:00 UTC) #48
Carlson
michaelpg@ Thanks for the review, PTAL? https://codereview.chromium.org/2613683004/diff/160001/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc File chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc (right): https://codereview.chromium.org/2613683004/diff/160001/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc#newcode205 chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc:205: printer_protocol + "://" ...
3 years, 10 months ago (2017-02-03 19:32:19 UTC) #50
michaelpg
lgtm https://codereview.chromium.org/2613683004/diff/160001/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc File chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc (right): https://codereview.chromium.org/2613683004/diff/160001/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc#newcode205 chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc:205: printer_protocol + "://" + printer_address + "/" + ...
3 years, 10 months ago (2017-02-03 22:02:53 UTC) #55
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/2613683004/180001
3 years, 10 months ago (2017-02-03 22:06:59 UTC) #58
commit-bot: I haz the power
3 years, 10 months ago (2017-02-03 22:50:32 UTC) #61
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/2fc4d82bfb5950942d8ac1548fa8...

Powered by Google App Engine
This is Rietveld 408576698