New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 730242 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Merge printer make and model fields

Project Member Reported by skau@chromium.org, Jun 6 2017

Issue description

Remove the make and model fields in PrinterConfiguration and replace it with a make_and_model field like we've done for PPD strings.  This will negate the need to try to parse arbitrary strings to find the correct separation.

This data is stored in user prefs so that will need to be migrated.

The combined value will appear in the 'Model' field in the settings UI.
 

Comment 1 by skau@chromium.org, Jun 28 2017

Status: Started (was: Untriaged)

Comment 2 by skau@chromium.org, Jun 28 2017

Tackling this in three stages:
1) Add field to proto, ensure it's computed
2) Write field to proto in addition to deprecated fields
3) Migrate users of manufacturer() and model() to make_and_model()

In the future (~5 milestones), we'll stop populating manufacturer() and model().

More detail here: go/bolton-make-model-migration
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6609d04f50475d06e8c34f2d1f293d07c2a92059

commit 6609d04f50475d06e8c34f2d1f293d07c2a92059
Author: skau <skau@chromium.org>
Date: Thu Jun 29 00:09:41 2017

Introduce the field make_and_model for synced printers.

Parsing manufacturer and model consistently is difficult.  We don't need
the separate fields so store it as a single string.  This CL deprecates
the old fields in the proto and ensures that the new field is populated.
Future CLs will migrate old PrinterSpecifics objects and remove usages of
manufacturer() and model() on the Printer object.

BUG=730242

Review-Url: https://codereview.chromium.org/2956173002
Cr-Commit-Position: refs/heads/master@{#483209}

[modify] https://crrev.com/6609d04f50475d06e8c34f2d1f293d07c2a92059/chrome/browser/chromeos/printing/specifics_translation.cc
[modify] https://crrev.com/6609d04f50475d06e8c34f2d1f293d07c2a92059/chrome/browser/chromeos/printing/specifics_translation_unittest.cc
[modify] https://crrev.com/6609d04f50475d06e8c34f2d1f293d07c2a92059/chromeos/printing/printer_configuration.h
[modify] https://crrev.com/6609d04f50475d06e8c34f2d1f293d07c2a92059/chromeos/printing/printer_translator.cc
[modify] https://crrev.com/6609d04f50475d06e8c34f2d1f293d07c2a92059/chromeos/printing/printer_translator_unittest.cc
[modify] https://crrev.com/6609d04f50475d06e8c34f2d1f293d07c2a92059/components/sync/protocol/printer_specifics.proto
[modify] https://crrev.com/6609d04f50475d06e8c34f2d1f293d07c2a92059/components/sync/protocol/proto_visitors.h

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e866a3bb9958f961e4ea76e0f9dacbc9f968235

commit 1e866a3bb9958f961e4ea76e0f9dacbc9f968235
Author: Sean Kau <skau@chromium.org>
Date: Thu Jul 20 21:32:32 2017

Populate make_and_model field for printers.

Ensure that manufacturer, model, and make_and_model are all populated.
manufacturer and model are populated for backward compatability.

Bug: 730242
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I8a31dbe57bfbc09e7f2e0f04bc7a1aa9b1599368
Reviewed-on: https://chromium-review.googlesource.com/563521
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Commit-Queue: Sean Kau <skau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488414}
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chrome/browser/chromeos/printing/printer_info.h
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chrome/browser/chromeos/printing/printer_info_cups.cc
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chrome/browser/chromeos/printing/printer_info_stub.cc
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chrome/browser/chromeos/printing/usb_printer_util.cc
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.js
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h
[modify] https://crrev.com/1e866a3bb9958f961e4ea76e0f9dacbc9f968235/chromeos/printing/printer_configuration.h

Labels: M-72
Labels: -M-72 Bolton-CodeHealth M-73
Labels: M-74
Labels: -M-73

Sign in to add a comment