Print Dialog: Add support for the Common Print Dialog Backends (CPDB)

874 views
Skip to first unread message

Till Kamppeter

unread,
May 2, 2023, 8:05:47 PM5/2/23
to Chromium-dev
I am Till Kamppeter, leader of OpenPrinting and so responsible for the printing infrastructure in Linux and other Posix-style operating systems.

https://openprinting.github.io/about-us/

The Chrome/Chromiun Browser (and probably other Chromium or Google applications on the Linux Desktop and also under Chromium OS) are under the few applications which have their own print dialog, and do not use one of the desktop environment toolkit's (GTK/Qt) ones primarily (AFAIR one can use the GTK one optionally, via a link/button in the Chrome/Chromium print dialog). Here a change is needed to assure smooth and easy printing in the future.

Now, after 22 years of CUPS with PPD files and print filter executables as printer drivers we have a change in the print architecture. The use of PPD files gets abolished in CUPS and CUPS will go all-IPP, due to the fact that modern printers are driverless IPP printers, which tell everything about their capabilities to the clients via IPP (so do not need PPDs) and use standard file formats for print jobs (and so do not need driver filters). This requires changes in print dialogs.

https://openprinting.github.io/current/#the-new-architecture-for-printing-and-scanning

Piotr already knows about this from several OpenPrinting Summits and OpenPrinting micro-conferences.

As this is most probably not the last major change needed and also for print dialogs to support other print technologies than CUPS, for example cloud printing services, I have created already 5 years ago, the concept of the Common Print Dialog Backends (CPDB):

https://openprinting.github.io/achievements/#common-print-dialog-backends

Here the print dialog does not talk directly with the print technology (like CUPS) but there are GUI-toolkit-independent backends, usually maintained by the maintainer/developer of the print technology (OpenPrinting for CUPS and for print-to-file). This way the maintainer of the print technology, when they change something, they also change the backend appropriately and all print dialogs immediately work with the change. And if someone introduces a cloud printing service, they simply put the backend for it into the Snap Store and once installed the user can use the service from any print dialog.

Now, with the upcoming New Architecture for printing and scanning there was a need of change on all print dialogs and I decided to finally get CPDB be used in all print dialogs, and found a great, enthusiastic GSoC (2022) contributor for it. He implemented the support in both GTK and Qt dialogs and succeeded to get the merge request on the GTK one accepted upstream.

https://github.com/TinyTrebuchet/gsoc22/
https://openprinting.github.io/OpenPrinting-News-February-2023/#common-print-dialog-backends-support-accepted-into-gtk

For this he did not only work on GTK and Qt code but also on the development of CPDB, creating a second generation with much more functionality:
https://openprinting.github.io/Common-Print-Dialog-Backends-Second-Generation-First-Beta-Release/

My Feature Request now is to get CPDB support into the print dialog of Chrome/Chromium, so that users of these applications will be able to continue to easily print also after the transition to CUPS 3.x (or to the CUPS Snap, which also does not support classic CUPS drivers/PPD files) and also print with any upcoming cloud printing technology right out of the print functionality of the Chromium applications.

For the implementation I have a GSoC contributor, Kushagra Sharma, who would do the coding, he only needs someone mentoring/guiding him on the Chrome/Chromium side to do the code contribution to Chrome/Chromium correctly.

K. Moon

unread,
May 2, 2023, 8:24:39 PM5/2/23
to till.ka...@gmail.com, Chromium-dev, Alan Screen, Lei Zhang
1. Can you (or your collaborator) file a feature request at crbug.com/new? The Print Preview or Printing component probably would be appropriate.

2. Is there a design document explaining the rationale for this feature, and how Chromium would integrate with CPDB?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/6d2680d0-4823-4bb5-a111-3a20736898f9n%40chromium.org.

Lei Zhang

unread,
May 3, 2023, 5:03:36 PM5/3/23
to till.ka...@gmail.com, Chromium-dev
Hi Till,

Thanks for raising this topic. I'm aware of CUPS moving from PPDs to
IPP, but I did not know about CPDB until recently, so I have some CPDB
questions.

1) What does the roadmap look like for CPDB adoption for various Linux
distros? On my own Linux machine, I see available CPDB packages, but
they are not installed. Will distros start shipping with CPDB by
default? If so, when?

2) Is the interface to CPDB sufficiently stable, such that any work
done in the near future will still be relevant in a few years?

K. Moon

unread,
May 8, 2023, 4:30:13 PM5/8/23
to Till Kamppeter, Chromium-dev, Alan Screen, Lei Zhang
In Chromium, a design document is something specific:

We generally would require a design document for a substantial architectural change (as opposed to a simple bug fix or minor enhancement), which this sounds like it would be. A long e-mail doesn't suffice to satisfy these requirements, as it's hard to provide detailed feedback, make sure all the important concerns (like security, privacy, compatibility, rollout, etc.) are covered, make sure reasonable alternatives were considered, etc. The design document also needs to address the specifics of how Chromium would be modified by the new feature, which requires knowledge of Chromium internals.

It doesn't have to be a book, especially in the first draft, but code reviews and landing code generally won't happen until an overall design has been approved, as there isn't enough certainty to know that the change is a good improvement without it.

This is something we would expect from the implementer; it's not necessary for a simple feature request (although a motivating explanation helps there).

On Mon, May 8, 2023 at 12:27 PM Till Kamppeter <till.ka...@gmail.com> wrote:
Sorry for the late reply, I was on a Canonical-internal meeting all last
week. Answers inline.


On 03/05/2023 02:22, K. Moon wrote:
> 1. Can you (or your collaborator) file a feature request at
> crbug.com/new <http://crbug.com/new>? The Print Preview or Printing
> component probably would be appropriate.
>

We will do so.


> 2. Is there a design document explaining the rationale for this feature,
> and how Chromium would integrate with CPDB?
>

Did my longer original e-mail (cited below) not explain it?

The actual explanation for CPDB is in

https://openprinting.github.io/achievements/#common-print-dialog-backends

and for the New Architecture in

https://openprinting.github.io/current/#the-new-architecture-for-printing-and-scanning

The New Architecture does a significant change in how CUPS behaves,
especially for print dialogs, that they

- Cannot download a PPD file or parts of it from CUPS to get knowledge
about the printer's capabilities and user settable options.

- Have to list also IPP print/faxout services for which there is no
physical, permanent CUPS queue, as printing to them makes CUPS creating
a temporary print queue.

These two points are covered by the CPDB CUPS backend, and future
changes in CUPS will get covered in sync with CUPS. So with CPDB support
enabled in the print dialog you will not need to chase after CUPS
changes any more.

    Till

Till Kamppeter

unread,
May 9, 2023, 1:29:34 PM5/9/23
to Lei Zhang, Chromium-dev
Sorry for the late reply, I was on a Canonical-internal conference last
week. Answers inline.

On 03/05/2023 23:01, Lei Zhang wrote:
> Hi Till,
>
> Thanks for raising this topic. I'm aware of CUPS moving from PPDs to
> IPP, but I did not know about CPDB until recently, so I have some CPDB
> questions.
>
> 1) What does the roadmap look like for CPDB adoption for various Linux
> distros? On my own Linux machine, I see available CPDB packages, but
> they are not installed. Will distros start shipping with CPDB by
> default? If so, when?
>

As soon as there are consumers (GTK print dialog, Qt print dialog,
Chromium Browser, Firefox, Thnderbird, LibreOffice, ...) distros will
include the CPDB libraries. The GTK dialog has already adopted CPDB, the
Merge Request for the Qt dialog is posted and in the works. I also have
contacted/feature-requested Mozilla (Firefox/Thunderbird) and
LibreOffice for adding CPDB support and they seem to be interested.

> 2) Is the interface to CPDB sufficiently stable, such that any work
> done in the near future will still be relevant in a few years?
>

Yes, we have mainly settled on the interfaces. Until the release
candidate there can only come slight corrections/additions. We will see
on the current work on CPDB support for the dialogs whether we did not
have forgotten anything and will release at the end of this year's GSoC
at the latest.

Till

Lei Zhang

unread,
May 19, 2023, 5:18:03 PM5/19/23
to Till Kamppeter, Chromium-dev
BTW, thanks for filing crbug.com/1445999.

Just to be clear, if you just want to experiment with Chromium code in
your own local git branches, don't let the design doc requirement stop
you.

On Mon, May 8, 2023 at 11:30 AM Till Kamppeter <till.ka...@gmail.com> wrote:
> As soon as there are consumers (GTK print dialog, Qt print dialog,
> Chromium Browser, Firefox, Thnderbird, LibreOffice, ...) distros will
> include the CPDB libraries. The GTK dialog has already adopted CPDB, the
> Merge Request for the Qt dialog is posted and in the works. I also have
> contacted/feature-requested Mozilla (Firefox/Thunderbird) and
> LibreOffice for adding CPDB support and they seem to be interested.

Is GTK (and QT) adoption sufficient for distro adoption? Would this
mean Ubuntu 23.10 will have CPDB packages installed by default?

Lei Zhang

unread,
Jun 5, 2023, 3:01:50 PM6/5/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
The interface for printing::PrintBackend is actually defined in
printing/backend/print_backend.h. If you want to implement a subclass
of PrintBackend that can be instantiated, then that subclass needs to
implement all the pure virtual functions in the base PrintBackend
class.

On Mon, Jun 5, 2023 at 11:55 AM B20251 Kushagra Sharma
<b20...@students.iitmandi.ac.in> wrote:
>
> Hi I looked at the print backend for chromium (link for reference https://github.com/chromium/chromium/tree/main/printing/backend). I need assistance to clear some doubts related to the implementation of print backend and print dialog. Could you help me connect with the right person for guidance. I need to know which functions are needed to be implemented in print backend.
> The print_backend_cups.cc file would typically include the necessary headers, such as print_backend_cups.h, which defines the interface and declarations for the CUPS-specific functionalities in Chromium's print backend. We need similar file for CPDB (print_backend_cpdb.cc) but I wanted to get functions are needed to be implemented in print backend.

Lei Zhang

unread,
Jun 15, 2023, 3:22:25 PM6/15/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
What git revision is your local tree synced to?

How is the build directory configured? i.e. what is in out/Default/args.gn.

Did "gclient sync" successfully run to completion?

On Thu, Jun 15, 2023 at 12:01 PM B20251 Kushagra Sharma
<b20...@students.iitmandi.ac.in> wrote:
>
> respected ,
> I am facing issues building chromium from source in both ubuntu 22.0.4 and debian 11. All the steps provided in the guide and running perfectly fine except the last step which is "autoninja -C out/Default chrome"
>
> PFA bug.txt file containing detailed log file of the error.
> It would be highly appreciated if someone could help me resolve this.
> thanks and regards
> Kushagra Sharma
> (OpenPrinting)

Lei Zhang

unread,
Jun 15, 2023, 6:32:28 PM6/15/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
It's still not clear what git revision you are on, but based on the
log, it looks like your git checkout was unlucky and synced to a
broken revision. Specifically, your build includes
https://crrev.com/1157882, which got reverted in
https://crrev.com/1158146. So if you just sync your Chromium git
checkout past that, and gclient sync again, then you should most past
this build error.

On Thu, Jun 15, 2023 at 3:23 PM B20251 Kushagra Sharma
<b20...@students.iitmandi.ac.in> wrote:
>
> gclient sync ran successfully without any warning.
> I used "gn gen out/Default" without any additional args.
> the issue seems to be there in "ui" folder inside "/chromium/src".
> I followed all steps given in the guide (link :https://github.com/chromium/chromium/blob/main/docs/linux/build_instructions.md)

Lei Zhang

unread,
Jun 16, 2023, 4:46:53 PM6/16/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
Please read the output carefully. The previous error did not persist.
The new failure log shows a new error. I have no idea where "Killed"
came from, but I imagine your system may have ran out of memory.

On Fri, Jun 16, 2023 at 1:41 PM B20251 Kushagra Sharma
<b20...@students.iitmandi.ac.in> wrote:
>
> It seems like the git checkout is not going to correct revision. I tried updating the checkout with the following commands
> "$ git rebase-update
> $ gclient sync"
> but the error still persists even after performing git pull for latest updates from main branch of chromium.
> It would be appreciated if you could help to resolve this build issue.
> PFA bug.txt for reference.

Lei Zhang

unread,
Jun 16, 2023, 5:14:30 PM6/16/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
It's your computer. Nobody else has access to it, so you have to
figure out why processes are getting killed. Maybe run ninja with -j1
or some small number to reduce the number of parallel jobs running,
which reduces system resource demands.

Note that meeting the minimum requirements for a Chromium installation
!= Meeting the minimum requirements for a Chromium developer
environment.

The minimum is just that. It may not guarantee a smooth developer experience.

On Fri, Jun 16, 2023 at 2:05 PM B20251 Kushagra Sharma
<b20...@students.iitmandi.ac.in> wrote:
>
> The system meets the minimum requirement for chromium installation. I agree this error is not same as earlier but this is not due to out of memory.

B20251 Kushagra Sharma

unread,
Jun 17, 2023, 2:21:07 AM6/17/23
to Chromium-dev, Lei Zhang, Chromium-dev, Till Kamppeter, B20251 Kushagra Sharma
gclient sync ran successfully without any warning.
I used "gn gen out/Default" without any additional args.
 the issue seems to be there in  "ui" folder inside "/chromium/src".

B20251 Kushagra Sharma

unread,
Jun 17, 2023, 2:21:12 AM6/17/23
to Chromium-dev, Lei Zhang, Chromium-dev, Till Kamppeter, B20251 Kushagra Sharma
respected ,
I am facing issues building chromium from source in both ubuntu 22.0.4 and debian 11.  All the steps provided in the guide and running perfectly fine except the last step which is "autoninja -C out/Default chrome"

PFA bug.txt file containing detailed log file of the error.
It would be highly appreciated if someone could help me resolve this.
thanks and regards
Kushagra Sharma
(OpenPrinting)

bug

B20251 Kushagra Sharma

unread,
Jun 17, 2023, 2:21:26 AM6/17/23
to Chromium-dev, Lei Zhang, Chromium-dev, Till Kamppeter, B20251 Kushagra Sharma
It seems like the git checkout is not going to correct revision. I tried updating the checkout with the following commands
"$ git rebase-update
$ gclient sync"
but the error still persists even after performing git pull for latest updates from main branch of chromium.
It would be appreciated if you could help to resolve this build issue.
PFA bug.txt for reference.


bug2

B20251 Kushagra Sharma

unread,
Jun 17, 2023, 2:21:37 AM6/17/23
to Chromium-dev, Lei Zhang, Chromium-dev, Till Kamppeter, B20251 Kushagra Sharma
The system meets the minimum requirement for chromium installation. I agree this error is not same as earlier but this is not due to out of memory.

B20251 Kushagra Sharma

unread,
Jun 17, 2023, 2:21:53 AM6/17/23
to Lei Zhang, Chromium-dev, Till Kamppeter
Thank you for your response, I will try to resolve this as soon as possible.

Lei Zhang

unread,
Jun 26, 2023, 2:30:07 PM6/26/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
PTAL at this doc:

https://chromium.googlesource.com/chromium/src/+/main/docs/how_to_add_your_feature_flag.md

Since this is about code in //printing, use
//printing/printing_features.h in this case.

On Sun, Jun 25, 2023 at 12:27 PM B20251 Kushagra Sharma
<b20...@students.iitmandi.ac.in> wrote:
>
> All the above issues are resolved. I have created a demo print backend using the interface provided in the printing/backend/print_backend.h and implemented the virtual functions provided in the interface. Could you help me to make print backend use my dummy print backend instead of default CUPS backend. What config files will I have to edit and other changes that i need to do so that It will use my print backend instead of other available backends.

B20251 Kushagra Sharma

unread,
Jun 27, 2023, 4:09:36 PM6/27/23
to Chromium-dev, B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter, Lei Zhang
All the above issues are resolved. I have created a demo print backend using the interface provided in the printing/backend/print_backend.h and implemented the virtual functions provided in the interface. Could you help me to make print backend use my dummy print backend instead of default CUPS backend. What config files will I have to edit and other changes that i need to do so that It will use my print backend instead of other available backends.

On Saturday, June 17, 2023 at 11:51:53 AM UTC+5:30 B20251 Kushagra Sharma wrote:

Lei Zhang

unread,
Jun 29, 2023, 7:54:28 PM6/29/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
The `use_cups` GN variable is set in
printing/buildflags/buildflags.gni, but you should not turn it off.
The process described in how_to_add_your_feature_flag.md is about
having features that can be toggled at runtime. Whereas you are trying
to build a feature that's toggled at build time.

On Thu, Jun 29, 2023 at 2:58 PM B20251 Kushagra Sharma
<b20...@students.iitmandi.ac.in> wrote:
>
> I have created to files that contains demo print backend (print_backend_demo.cc and print_backend_demo.h) , In the file //printing/printing_features.h I could not find the linux/cups section there is only windows mac and OOP section. In the file /printing/buildflags/BUILD.gn could you specify the origin of the flag "use_cups" can it be disabled in command line or through code itself so that i can create similar flag for CPDB. could you provide stepwise guide to disable cups and enable CPDB during build.

Lei Zhang

unread,
Jun 30, 2023, 1:58:03 PM6/30/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
Chromium's build system generally does not do system feature detection
and configuration like autoconf. I would suggest adding a GN use_cpdb
variable for now and set it to is_linux as the default value. Would
that work? If someone wants to build Chromium without CPDB, they would
need to turn it off in their build config.

To repeat yet again, when both backends are built into the binary, we
want to be able to select between them at runtime using the technique
outlined in how_to_add_your_feature_flag.md. So the build needs to be
able to include both CUPS and CPDB, and not have CPDB disable CUPS at
build time.

On Fri, Jun 30, 2023 at 1:14 AM B20251 Kushagra Sharma
<b20...@students.iitmandi.ac.in> wrote:
>
> Since CUPS is build time feature , I wanted to make CPDB also build time but instead of disabling CUPS I can make a flag if CPDB is found and supported by the system then use CPDB instead of CUPS and this can be done during build time. Kindly let me know if this approach works for you.

B20251 Kushagra Sharma

unread,
Jun 30, 2023, 4:28:46 PM6/30/23
to Chromium-dev, B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter, Lei Zhang
I have created to files that contains demo print backend (print_backend_demo.cc and print_backend_demo.h) , In the file //printing/printing_features.h I could not find the linux/cups section there is only windows mac and OOP section. In the file /printing/buildflags/BUILD.gn  could you specify the origin of the flag "use_cups" can it be disabled in command line or through code itself so that i can create similar flag for CPDB. could you provide stepwise guide to disable cups and enable CPDB during build.

B20251 Kushagra Sharma

unread,
Jun 30, 2023, 4:28:53 PM6/30/23
to Lei Zhang, Chromium-dev, Till Kamppeter
Since CUPS is build time feature , I wanted to make CPDB also build time but instead of disabling CUPS I can make a flag if CPDB is found and supported by the system then use CPDB instead of CUPS and this can be done during build time. Kindly let me know if this approach works for you.

B20251 Kushagra Sharma

unread,
Jul 4, 2023, 6:42:42 AM7/4/23
to Chromium-dev, B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter, Lei Zhang
I have added a use_cpdb variable in the /printing/buildflags/BUILD.gn and /printing/buildflags/buildflags.gni without changing CUPS variable then /printing/BUILD.gn I have added sources to use dummy cpdb print backend. Is this the correct procedure as currently both CUPS and dummy CPDB is enabled and cpdb is not forcing cups to disable. But when i re build the source code it is still using CUPS as print backend.
Let me know if I am missing anything.

Lei Zhang

unread,
Jul 5, 2023, 1:22:26 PM7/5/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
Have you tried looking into how the CUPS Backend gets instantiated,
and changing the relevant code to instantiate the CPDB Backend when
appropriate?

On Sun, Jul 2, 2023 at 1:00 PM B20251 Kushagra Sharma

B20251 Kushagra Sharma

unread,
Jul 5, 2023, 3:19:40 PM7/5/23
to Lei Zhang, Chromium-dev, Till Kamppeter
Yes I looked at the code to instantiate CUPS and I followed same steps to instantiate CPDB but issue is CUPS is instantiated during build time and same goes for cpdb as well now if I don’t disable cups if cpdb is found in system then how will the system work?

Lei Zhang

unread,
Jul 5, 2023, 4:28:59 PM7/5/23
to B20251 Kushagra Sharma, Chromium-dev, Till Kamppeter
I suspect you are confused about code being linked into a binary at
build time vs. C++ class instantiation at runtime. Multiple backends
can be linked in at build time, and the one actually used can be
selected at runtime.

On Wed, Jul 5, 2023 at 12:17 PM B20251 Kushagra Sharma

B20251 Kushagra Sharma

unread,
Jul 9, 2023, 8:28:37 AM7/9/23
to Chromium-dev, Lei Zhang, Chromium-dev, Till Kamppeter, B20251 Kushagra Sharma
I am facing an issue while re-building chromium after making changes. Please find attached text file capturing the bug information. I have cloned same steps which are used in CUPS without disabling CUPS.Feel free to ask details necessary for better understanding
bug 3

K. Moon

unread,
Jul 10, 2023, 12:27:22 PM7/10/23
to b20...@students.iitmandi.ac.in, Chromium-dev, Lei Zhang, Till Kamppeter
1. The attachment is showing up as an unknown file type to me. For future reference, it's better to send this as a .txt file.
2. You're getting a linking error because of a missing symbol. The most common reason for this is that you misspelled something in your C++ code. We can't help you with this without being able to see your code.
3. If you want to share your code, you should sign the CLA and upload a patchset to Gerrit.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

B20251 Kushagra Sharma

unread,
Jul 10, 2023, 6:03:17 PM7/10/23
to Chromium-dev, K. Moon, Chromium-dev, Lei Zhang, Till Kamppeter, b20...@students.iitmandi.ac.in
I have created a dummy print backend with all the virtual functions as in /printing/printing_backend.h and tried to add it in the same build.gn file where cups is also added but if i do not disable CUPS then only CUPS printers are rendered and if I disable CUPS then I get linking error. I think this could be due to error in adding feature for dummy print backend, I tried to follow the document provide by Lei Zhang on how to add feature in chromium but there is no base feature for linux or CUPS as well in the /printing/printing_features.h. It will be very helpful if you could provide steps to add print backend without changing cups

K. Moon

unread,
Jul 10, 2023, 6:10:08 PM7/10/23
to B20251 Kushagra Sharma, Chromium-dev, Lei Zhang, Till Kamppeter
Can you upload your code to Gerrit and share the link with us?

B20251 Kushagra Sharma

unread,
Jul 10, 2023, 6:19:13 PM7/10/23
to Chromium-dev, K. Moon, Chromium-dev, Lei Zhang, Till Kamppeter, B20251 Kushagra Sharma
sure, If i clone the repository and push the changes in a new branch and share the branch will that work?

K. Moon

unread,
Jul 10, 2023, 7:06:22 PM7/10/23
to B20251 Kushagra Sharma, Chromium-dev, Lei Zhang, Till Kamppeter

K. Moon

unread,
Jul 10, 2023, 7:07:02 PM7/10/23
to B20251 Kushagra Sharma, Chromium-dev, Lei Zhang, Till Kamppeter
Actually, in this case, you can ignore the PDFium contribution instructions, as this is a Chromium contribution.

B20251 Kushagra Sharma

unread,
Aug 12, 2023, 7:32:28 AM8/12/23
to Chromium-dev, K. Moon, Chromium-dev, Lei Zhang, Till Kamppeter, B20251 Kushagra Sharma
Hi,
I have tried to change the flags according to the documents but the print dialog is still not using the demo_print_backend I have created. I have pushed the code for review as per the gerrit guidelines. Here is the link for your reference (link:https://chromium-review.googlesource.com/c/chromium/src/+/4775999/1). Kindly let me know if I am missing any build flags or if there is any other issue with the code.
Thanks and regards

B20251 Kushagra Sharma

unread,
Aug 21, 2023, 4:46:33 AM8/21/23
to Chromium-dev, B20251 Kushagra Sharma, K. Moon, Chromium-dev, Lei Zhang, Till Kamppeter
I have added a comment on the reviews, kindly have a look at it ( here is a link:https://chromium-review.googlesource.com/c/chromium/src/+/4775999/comments/dd6972c7_e6ac2cd1)

regards 
Kushagra 

K. Moon

unread,
Aug 21, 2023, 12:32:02 PM8/21/23
to B20251 Kushagra Sharma, Chromium-dev, Lei Zhang, Till Kamppeter
I don't see anything. Did you actually send your comment? Adding a comment only adds an unsent draft.

B20251 Kushagra Sharma

unread,
Aug 21, 2023, 12:41:30 PM8/21/23
to K. Moon, Chromium-dev, Lei Zhang, Till Kamppeter
Sorry, I didn’t know that. Could you check I have sent the comment now, hopefully it should be visible .

K. Moon

unread,
Aug 21, 2023, 12:42:10 PM8/21/23
to B20251 Kushagra Sharma, Chromium-dev, Lei Zhang, Till Kamppeter
Yes, I see it now. Thanks!

B20251 Kushagra Sharma

unread,
Nov 9, 2023, 9:56:34 AM11/9/23
to K. Moon, Chromium-dev, Lei Zhang, Till Kamppeter

Hi,
 I have completed the code for CPDB and it is working now, I have pushed it to a new branch in a new CL, here is the link for it (
I could not add reviewer to the CL, how to add reviewer to the code. Also I faced some pre submit error as I added a new code for PKG-config which was failing in pre submit. There will be few changes required after the review is done and then the code will be completed.
Thanks and regards

K. Moon

unread,
Feb 11, 2024, 2:55:12 PM2/11/24
to Till Kamppeter, B20251 Kushagra Sharma, Chromium-dev, Lei Zhang
There was a comment left on the tracking bug:

It was never responded to.

On Sun, Feb 11, 2024, 9:05 AM Till Kamppeter <till.ka...@gmail.com> wrote:
Hi,

my GSoC contributor for OpenPrinting, Kushagra Sharma has finished his
project work and now we want to get it included in the upstream code.

He has announced his merge proposal to this list (see post below) and he
got stock on how to add reviewers to his merge proposal. And he has also
some additional questions. See his post below.

He posted already back in November, 3 months ago and did not hear
anything back.

The inclusion of his work makes especially the print dialog working with
the upcoming CUPS 3.x, while the current print dialog of the
Chrome/Chromium Browser does not. So we need the change so that
distributions can smoothly switch to CUPS 3.x, without printing ceasing
to work in Chrome/Chromium.

Thanks in advance for resuming on this project to get it included.

    Till


On 09/11/2023 15:54, B20251 Kushagra Sharma wrote:
>
> Hi,
>   I have completed the code for CPDB and it is working now, I have
> pushed it to a new branch in a new CL, here is the link for it (
> https://chromium-review.googlesource.com/c/chromium/src/+/5007092

K. Moon

unread,
Feb 11, 2024, 2:57:08 PM2/11/24
to Till Kamppeter, B20251 Kushagra Sharma, Chromium-dev, Lei Zhang
Specifically, the question I have is whether there was an attempt to follow the procedure given here:

If so, what was the specific road block that prevented following the procedure?

B20251 Kushagra Sharma

unread,
Feb 11, 2024, 3:02:49 PM2/11/24
to K. Moon, Chromium-dev, Lei Zhang, Till Kamppeter
Hi,
I followed the same procedure for git cl but it was failing pre submit checks due to newly added pkg-config for cpdb. So I bypassed the pre submit and created CL which did not have any reviewers. 

B20251 Kushagra Sharma

unread,
Feb 11, 2024, 3:05:40 PM2/11/24
to K. Moon, Chromium-dev, Lei Zhang, Till Kamppeter
Hi,
I have followed the same document for making Git CL but it was failing at the pre submit checks due to newly created pkg-config for cpdb. I had to bypass pre submit and that created a CL with no reviewers.

On Mon, 12 Feb 2024 at 1:26 AM, K. Moon <km...@chromium.org> wrote:

Matthew Menke

unread,
Feb 11, 2024, 8:35:37 PM2/11/24
to Chromium-dev, B20251 Kushagra Sharma, Chromium-dev, Lei Zhang, Till Kamppeter, K. Moon
I can't comment on that particular presubmit check failure, but the CL author is responsible for choosing reviewers themselves, and adding them to the CL, per the "Requesting review" section of https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/contributing.md#Code-review.

Till Kamppeter

unread,
Feb 12, 2024, 5:09:35 AM2/12/24
to B20251 Kushagra Sharma, K. Moon, Chromium-dev, Lei Zhang
Hi,

my GSoC contributor for OpenPrinting, Kushagra Sharma has finished his
project work and now we want to get it included in the upstream code.

He has announced his merge proposal to this list (see post below) and he
got stock on how to add reviewers to his merge proposal. And he has also
some additional questions. See his post below.

He posted already back in November, 3 months ago and did not hear
anything back.

The inclusion of his work makes especially the print dialog working with
the upcoming CUPS 3.x, while the current print dialog of the
Chrome/Chromium Browser does not. So we need the change so that
distributions can smoothly switch to CUPS 3.x, without printing ceasing
to work in Chrome/Chromium.

Thanks in advance for resuming on this project to get it included.

Till

On 09/11/2023 15:54, B20251 Kushagra Sharma wrote:
>
> Hi,
>  I have completed the code for CPDB and it is working now, I have
> pushed it to a new branch in a new CL, here is the link for it (
> https://chromium-review.googlesource.com/c/chromium/src/+/5007092
> <https://chromium-review.googlesource.com/c/chromium/src/+/5007092>)

B20251 Kushagra Sharma

unread,
Feb 23, 2024, 4:29:56 AM2/23/24
to Matthew Menke, Chromium-dev, Lei Zhang, Till Kamppeter
Hi,
I was able to K moon as reviewer for the CL I have added as he was the owner of the /printing directory but he commented on the CL that he is no longer working on chromium’s printing code review process. 
Implementing CPDB will be a crucial component as later this year with CUPS 3.x chromium will not be able to perform printing operation. Kindly let me know who else could pick this up.

Thanks and regards 
Kushagra sharma

Lei Zhang

unread,
Feb 23, 2024, 7:22:07 PM2/23/24
to Till Kamppeter, B20251 Kushagra Sharma, K. Moon, Chromium-dev
I replied on the CL. Apologies for being slow there.

While you mentioned the project is "finished", after the first pass at
reviewing the code, I would say it still has a ways to go to meet
Chromium's coding standards. As the project mentor, it would be
helpful to work with the GSoC contributor and do some code reviews to
help them along.

BTW, there are still outstanding comments in the design doc as well.
There haven't been any activities on the doc for a while.

Lei Zhang

unread,
Feb 23, 2024, 7:24:08 PM2/23/24
to B20251 Kushagra Sharma, K. Moon, Chromium-dev, Till Kamppeter
Can you mention what exact presubmit error you encountered? It's
difficult to help without knowing what the problem is, considering
Chromium probably has O(hundreds) of presubmit checks.

On Thu, Nov 9, 2023 at 6:54 AM B20251 Kushagra Sharma

Lei Zhang

unread,
Feb 23, 2024, 8:15:40 PM2/23/24
to Till Kamppeter, B20251 Kushagra Sharma, K. Moon, Chromium-dev
In particular, as an expert on CPDB, it would be great if you can
participate in the code review process.

K. Moon

unread,
Feb 24, 2024, 10:45:35 AM2/24/24
to Lei Zhang, Till Kamppeter, B20251 Kushagra Sharma, Chromium-dev
Just to clarify one thing: I'm not in the OWNERS file for the //printing tree, so I would not be a good choice for the changes being discussed (as you would need a second review from a //printing owner anyway). This is the primary reason I removed myself as a reviewer. A secondary reason is that I no longer work on Chromium as part of my job, so I can only do reviews in my free time, which is much more limited; so unless you're very patient, I'm also probably not a good choice for any task requiring multiple rounds of code review.

As a side observation: The primary purpose of working on a GSoC project should be learning how to contribute productively to open source. Landing a useful improvement is a nice bonus, but the main focus should be learning how to navigate an open source community and its established practices and processes. Chromium is admittedly a big and complicated project to navigate, but that's the point: Contributing to major open source projects is a very different experience from working on a personal project, or putting together a homework assignment for a class.

For Chromium, the most important thing to do is to read and truly understand the "how to contribute" page (https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/contributing.md), and to engage with project members (which includes being responsive to feedback, and yes, being persistent to get attention!) Writing lots of code is the very least important part, in my view.

In that spirit, I hope the focus from here on isn't trying to land this code just to get this feature in, but on learning how to collaborate productively. I've only glanced casually at the code, but I agree with Lei that there's probably quite a bit of work left before this code can be merged successfully into Chromium's code base.
Reply all
Reply to author
Forward
0 new messages