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

Issue 3945003: Move useful printing backend code from chrome/service/cloud_print to printing... (Closed)

Created:
10 years, 2 months ago by Lei Zhang
Modified:
9 years, 7 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Move useful printing backend code from chrome/service/cloud_print to printing/backend. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=63772

Patch Set 1 #

Total comments: 16

Patch Set 2 : '' #

Patch Set 3 : fix win build #

Total comments: 2

Patch Set 4 : resolve merge conflict #

Unified diffs Side-by-side diffs Delta from patch set Stats (+403 lines, -1619 lines) Patch
M build/common.gypi View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_consts.h View 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_consts.cc View 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_proxy.h View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_proxy.cc View 1 2 3 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_proxy_backend.h View 1 2 3 4 chunks +3 lines, -4 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_proxy_backend.cc View 1 2 3 15 chunks +19 lines, -17 lines 0 comments Download
M chrome/service/cloud_print/print_system.h View 1 2 3 5 chunks +10 lines, -30 lines 0 comments Download
M chrome/service/cloud_print/print_system.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/service/cloud_print/print_system_cups.cc View 1 2 3 12 chunks +28 lines, -206 lines 0 comments Download
M chrome/service/cloud_print/print_system_win.cc View 2 3 12 chunks +25 lines, -146 lines 0 comments Download
M chrome/service/cloud_print/printer_job_handler.h View 1 2 3 4 chunks +3 lines, -4 lines 0 comments Download
M chrome/service/cloud_print/printer_job_handler.cc View 1 2 3 4 chunks +7 lines, -7 lines 0 comments Download
A printing/backend/cups_helper.h View 1 1 chunk +31 lines, -0 lines 0 comments Download
A printing/backend/cups_helper.cc View 1 1 chunk +44 lines, -0 lines 0 comments Download
A + printing/backend/print_backend.h View 1 2 3 3 chunks +23 lines, -148 lines 0 comments Download
A printing/backend/print_backend.cc View 1 chunk +15 lines, -0 lines 0 comments Download
A printing/backend/print_backend_consts.h View 1 chunk +12 lines, -0 lines 0 comments Download
A printing/backend/print_backend_consts.cc View 1 chunk +10 lines, -0 lines 0 comments Download
A + printing/backend/print_backend_cups.cc View 1 7 chunks +58 lines, -408 lines 0 comments Download
A + printing/backend/print_backend_dummy.cc View 1 chunk +9 lines, -14 lines 0 comments Download
A + printing/backend/print_backend_win.cc View 2 6 chunks +19 lines, -603 lines 0 comments Download
A printing/backend/win_helper.h View 1 chunk +16 lines, -0 lines 0 comments Download
A printing/backend/win_helper.cc View 1 chunk +17 lines, -0 lines 0 comments Download
M printing/printing.gyp View 1 2 3 4 chunks +46 lines, -11 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Lei Zhang
Hi folks, I want to move some core printer enumeration capability out of chrome/service/cloud_print, so ...
10 years, 2 months ago (2010-10-20 09:04:15 UTC) #1
M-A Ruel
some nits, nothing huge. http://codereview.chromium.org/3945003/diff/1/9 File chrome/service/cloud_print/print_system_cups.cc (right): http://codereview.chromium.org/3945003/diff/1/9#newcode16 chrome/service/cloud_print/print_system_cups.cc:16: #include "base/file_path.h" Maybe an include ...
10 years, 2 months ago (2010-10-20 14:42:34 UTC) #2
sanjeevr
As I mentioned in my comment, I think you should simply replace PrintSystemXXX with PrintBackendXXX ...
10 years, 2 months ago (2010-10-21 17:25:38 UTC) #3
Lei Zhang
Sanjeev, my motivation for doing this is to reuse the printer enumeration code without creating ...
10 years, 2 months ago (2010-10-21 22:14:39 UTC) #4
Scott Byer
NIt: http://codereview.chromium.org/3945003/diff/1/15 File printing/backend/print_backend_cups.cc (right): http://codereview.chromium.org/3945003/diff/1/15#newcode82 printing/backend/print_backend_cups.cc:82: LOG(INFO) << "CUPS: Enumerated " << printer_list->size() << ...
10 years, 2 months ago (2010-10-21 22:33:41 UTC) #5
sanjeevr
I see. Hmmm, looks like the Windows code could use some refactoring to make this ...
10 years, 2 months ago (2010-10-22 06:15:52 UTC) #6
sanjeevr
LGTM with a comment http://codereview.chromium.org/3945003/diff/40001/41019 File printing/backend/print_backend_cups.cc (right): http://codereview.chromium.org/3945003/diff/40001/41019#newcode184 printing/backend/print_backend_cups.cc:184: const DictionaryValue* print_backend_settings) { Shouldn't ...
10 years, 2 months ago (2010-10-22 19:27:32 UTC) #7
Lei Zhang
http://codereview.chromium.org/3945003/diff/1/9 File chrome/service/cloud_print/print_system_cups.cc (right): http://codereview.chromium.org/3945003/diff/1/9#newcode16 chrome/service/cloud_print/print_system_cups.cc:16: #include "base/file_path.h" On 2010/10/20 14:42:35, Marc-Antoine Ruel wrote: > ...
10 years, 2 months ago (2010-10-22 20:25:27 UTC) #8
sanjeevr
10 years, 2 months ago (2010-10-25 17:09:44 UTC) #9
Still LGTM from me.

On 2010/10/22 20:25:27, Lei Zhang wrote:
> http://codereview.chromium.org/3945003/diff/1/9
> File chrome/service/cloud_print/print_system_cups.cc (right):
> 
> http://codereview.chromium.org/3945003/diff/1/9#newcode16
> chrome/service/cloud_print/print_system_cups.cc:16: #include
"base/file_path.h"
> On 2010/10/20 14:42:35, Marc-Antoine Ruel wrote:
> > Maybe an include or two aren't necessary anymore? Maybe not.
> 
> Removed file_util.h.
> 
> http://codereview.chromium.org/3945003/diff/1/9#newcode332
> chrome/service/cloud_print/print_system_cups.cc:332: printing::init_gcrypt();
> On 2010/10/21 17:25:38, sanjeevr wrote:
> > I don't think you need this any more. You are calling init_gcrypt in
> > PrintBackendCUPS::CreateInstance
> 
> Removed.
> 
> http://codereview.chromium.org/3945003/diff/1/12
> File printing/backend/cups_helper.cc (right):
> 
> http://codereview.chromium.org/3945003/diff/1/12#newcode51
> printing/backend/cups_helper.cc:51: static Lock init_gcrypt_lock;
> On 2010/10/20 14:42:35, Marc-Antoine Ruel wrote:
> > This code is dependent on not using -fno-threadsafe-statics. It's fine since
> we
> > assume this code is to always be compiled with gcc, but what about clang?
> > 
> > Using a singleton instead would make the code slightly safer, at least
w.r.t.
> > assuming thread safe static local variable initialization.
> 
> Done.
> 
> http://codereview.chromium.org/3945003/diff/1/14
> File printing/backend/print_backend.h (right):
> 
> http://codereview.chromium.org/3945003/diff/1/14#newcode54
> printing/backend/print_backend.h:54: PrinterCapsAndDefaults* printer_info) =
0;
> On 2010/10/20 14:42:35, Marc-Antoine Ruel wrote:
> > please align
> 
> Done.
> 
> http://codereview.chromium.org/3945003/diff/1/14#newcode59
> printing/backend/print_backend.h:59: // Call this function to obtain print
> backend for the specified print server.
> On 2010/10/20 14:42:35, Marc-Antoine Ruel wrote:
> > // Allocates a print backend for ...
> 
> Done.
> 
> http://codereview.chromium.org/3945003/diff/1/15
> File printing/backend/print_backend_cups.cc (right):
> 
> http://codereview.chromium.org/3945003/diff/1/15#newcode23
> printing/backend/print_backend_cups.cc:23: explicit PrintBackendCUPS(const
GURL&
> print_server_url);
> On 2010/10/20 14:42:35, Marc-Antoine Ruel wrote:
> > Please define the virtual destructor even if it does nothing.
> 
> Done.
> 
> http://codereview.chromium.org/3945003/diff/40001/41019#newcode184
> printing/backend/print_backend_cups.cc:184: 
> On 2010/10/22 19:27:32, sanjeevr wrote:
> > Shouldn't we just pass in the url as a string instead of passing in a
> > DictionaryValue? Or do you foresee other parameters that we might want to
pass
> > in?
> 
> I left it as a DictionaryValue so we can easily pass in new values in the
> future.

Powered by Google App Engine
This is Rietveld 408576698