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

Issue 566693002: Use file handles to interact with utility process. (Closed)

Created:
6 years, 3 months ago by Vitaly Buka (NO REVIEWS)
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Use file handles to interact with utility process. Spool pages as they returned from conversion instead of waiting for entire document. Service process loads each PDFs once per print job, instead of once per page. BUG=408184 Committed: https://crrev.com/34cea56676e4d4cad6710906c23c5d5260d12be7 Cr-Commit-Position: refs/heads/master@{#295360}

Patch Set 1 : Fri Sep 12 15:13:21 PDT 2014 #

Patch Set 2 : Fri Sep 12 21:01:56 PDT 2014 #

Patch Set 3 : Mon Sep 15 03:22:54 PDT 2014 #

Total comments: 26

Patch Set 4 : Mon Sep 15 15:32:16 PDT 2014 #

Patch Set 5 : Mon Sep 15 18:19:41 PDT 2014 #

Total comments: 40

Patch Set 6 : Tue Sep 16 00:49:42 PDT 2014 #

Patch Set 7 : Tue Sep 16 00:58:06 PDT 2014 #

Patch Set 8 : Tue Sep 16 01:11:23 PDT 2014 #

Total comments: 5

Patch Set 9 : Tue Sep 16 15:03:32 PDT 2014 #

Patch Set 10 : Tue Sep 16 15:41:47 PDT 2014 #

Total comments: 3

Patch Set 11 : Tue Sep 16 16:01:51 PDT 2014 #

Total comments: 6

Patch Set 12 : Wed Sep 17 10:40:51 PDT 2014 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+924 lines, -686 lines) Patch
M chrome/browser/printing/pdf_to_emf_converter.h View 1 2 3 4 5 2 chunks +19 lines, -10 lines 0 comments Download
M chrome/browser/printing/pdf_to_emf_converter.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +372 lines, -223 lines 0 comments Download
M chrome/browser/printing/print_job.h View 1 2 3 4 chunks +26 lines, -3 lines 0 comments Download
M chrome/browser/printing/print_job.cc View 1 2 3 4 5 4 chunks +108 lines, -1 line 0 comments Download
M chrome/browser/printing/print_view_manager_base.h View 1 2 3 chunks +0 lines, -12 lines 0 comments Download
M chrome/browser/printing/print_view_manager_base.cc View 1 2 3 3 chunks +2 lines, -53 lines 0 comments Download
M chrome/chrome.gyp View 1 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/chrome_utility_printing_messages.h View 1 2 3 4 3 chunks +29 lines, -20 lines 0 comments Download
M chrome/service/BUILD.gn View 1 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/service/cloud_print/print_system_win.cc View 1 2 3 4 9 chunks +35 lines, -58 lines 0 comments Download
M chrome/service/cloud_print/printer_job_queue_handler.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/service/service_utility_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +30 lines, -39 lines 0 comments Download
M chrome/service/service_utility_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +196 lines, -153 lines 0 comments Download
M chrome/utility/printing_handler.h View 1 2 3 4 chunks +16 lines, -17 lines 0 comments Download
M chrome/utility/printing_handler.cc View 1 2 3 3 chunks +77 lines, -92 lines 0 comments Download

Messages

Total messages: 49 (16 generated)
Vitaly Buka (NO REVIEWS)
6 years, 3 months ago (2014-09-12 22:19:38 UTC) #2
Lei Zhang
Can you fix the build first? I fixed the subject line BTW.
6 years, 3 months ago (2014-09-12 22:24:03 UTC) #3
Vitaly Buka (NO REVIEWS)
On 2014/09/12 22:24:03, Lei Zhang wrote: > Can you fix the build first? > > ...
6 years, 3 months ago (2014-09-13 02:57:33 UTC) #11
Lei Zhang
Doh, I just lost all my pending review messages. :(
6 years, 3 months ago (2014-09-13 04:05:05 UTC) #14
Vitaly Buka (NO REVIEWS)
We also can use BATCH mode where browser controls process Browser->LoadPDF->Utility Browser<-PdfLoaded(number_of_pages)<-Utility Browser->GetPage(i)->Utility Browser<-PageDone<-Utility ...
6 years, 3 months ago (2014-09-13 06:58:09 UTC) #15
Vitaly Buka (NO REVIEWS)
> Also looking on UtilityProcessHostImpl I have noticed that we don't need to run > ...
6 years, 3 months ago (2014-09-13 17:26:59 UTC) #16
Vitaly Buka (NO REVIEWS)
Please take a look at pdf_to_emf_converter.cc, chrome/utility/printing_handler.cc and chrome_utility_printing_messages.h Which one do you like more, ...
6 years, 3 months ago (2014-09-15 10:25:31 UTC) #17
Lei Zhang
I like patch set 3 better. https://codereview.chromium.org/566693002/diff/210001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/566693002/diff/210001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode159 chrome/browser/printing/pdf_to_emf_converter.cc:159: DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); nit: DCHECK_CURRENTLY_ON() ...
6 years, 3 months ago (2014-09-15 21:49:53 UTC) #18
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/566693002/diff/210001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/566693002/diff/210001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode159 chrome/browser/printing/pdf_to_emf_converter.cc:159: DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); On 2014/09/15 21:49:53, Lei Zhang wrote: > nit: ...
6 years, 3 months ago (2014-09-15 22:33:50 UTC) #19
Vitaly Buka (NO REVIEWS)
Done.
6 years, 3 months ago (2014-09-16 01:21:09 UTC) #20
Lei Zhang
Need to fix non-Win builds. https://codereview.chromium.org/566693002/diff/210001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/566693002/diff/210001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode215 chrome/browser/printing/pdf_to_emf_converter.cc:215: BrowserThread::PostTask( On 2014/09/15 22:33:49, ...
6 years, 3 months ago (2014-09-16 03:36:55 UTC) #21
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/566693002/diff/250001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/566693002/diff/250001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode27 chrome/browser/printing/pdf_to_emf_converter.cc:27: typedef scoped_ptr<base::File, BrowserThread::DeleteOnFileThread> TempFilePtr; On 2014/09/16 03:36:54, Lei Zhang ...
6 years, 3 months ago (2014-09-16 07:50:36 UTC) #22
Lei Zhang
Looking good. Can you help me understand the global ScopedTempDir usage? https://codereview.chromium.org/566693002/diff/250001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): ...
6 years, 3 months ago (2014-09-16 19:57:37 UTC) #23
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/566693002/diff/250001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): https://codereview.chromium.org/566693002/diff/250001/chrome/service/service_utility_process_host.cc#newcode97 chrome/service/service_utility_process_host.cc:97: emf_files_.push_back(CreateTempFile()); On 2014/09/16 19:57:36, Lei Zhang wrote: > On ...
6 years, 3 months ago (2014-09-16 22:10:37 UTC) #24
Lei Zhang
https://codereview.chromium.org/566693002/diff/310001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/566693002/diff/310001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode176 chrome/browser/printing/pdf_to_emf_converter.cc:176: // Use global object to avoid tracking all opened ...
6 years, 3 months ago (2014-09-16 22:40:00 UTC) #25
Vitaly Buka (NO REVIEWS)
On 2014/09/16 22:40:00, Lei Zhang wrote: > https://codereview.chromium.org/566693002/diff/310001/chrome/browser/printing/pdf_to_emf_converter.cc > File chrome/browser/printing/pdf_to_emf_converter.cc (right): > > https://codereview.chromium.org/566693002/diff/310001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode176 ...
6 years, 3 months ago (2014-09-16 22:43:48 UTC) #26
Lei Zhang
On 2014/09/16 22:43:48, Vitaly Buka wrote: > Yes. Windows can't delete dirs with opened files. ...
6 years, 3 months ago (2014-09-16 22:47:22 UTC) #27
Vitaly Buka (NO REVIEWS)
On 2014/09/16 22:47:22, Lei Zhang wrote: > On 2014/09/16 22:43:48, Vitaly Buka wrote: > > ...
6 years, 3 months ago (2014-09-16 22:48:37 UTC) #28
Lei Zhang
lgtm https://codereview.chromium.org/566693002/diff/350001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/566693002/diff/350001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode44 chrome/browser/printing/pdf_to_emf_converter.cc:44: }; DISALLOW_COPY_AND_ASSIGN()
6 years, 3 months ago (2014-09-16 22:52:24 UTC) #29
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/566693002/diff/350001/chrome/browser/printing/pdf_to_emf_converter.cc File chrome/browser/printing/pdf_to_emf_converter.cc (right): https://codereview.chromium.org/566693002/diff/350001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode30 chrome/browser/printing/pdf_to_emf_converter.cc:30: class RefCountedTempDir Documented. https://codereview.chromium.org/566693002/diff/350001/chrome/browser/printing/pdf_to_emf_converter.cc#newcode44 chrome/browser/printing/pdf_to_emf_converter.cc:44: }; On 2014/09/16 22:52:23, ...
6 years, 3 months ago (2014-09-16 23:08:10 UTC) #30
Vitaly Buka (NO REVIEWS)
+jln for ServiceSandboxedProcessLauncherDelegate in chrome/service/service_utility_process_host.cc and chrome/common/chrome_utility_printing_messages.h
6 years, 3 months ago (2014-09-16 23:10:22 UTC) #32
Vitaly Buka (NO REVIEWS)
+tsepez Also for ServiceSandboxedProcessLauncherDelegate in chrome/service/service_utility_process_host.cc Here the only change is removed exposing to sandbox ...
6 years, 3 months ago (2014-09-17 00:44:33 UTC) #34
Tom Sepez
+wfh for windows implications in service_utility_process_host.cc I didn't see where the filenames/directory names come from. ...
6 years, 3 months ago (2014-09-17 16:59:24 UTC) #35
Tom Sepez
Actually add @wfh this time.
6 years, 3 months ago (2014-09-17 17:00:50 UTC) #37
Vitaly Buka (NO REVIEWS)
On 2014/09/17 16:59:24, Tom Sepez wrote: > +wfh for windows implications in service_utility_process_host.cc > > ...
6 years, 3 months ago (2014-09-17 17:40:29 UTC) #38
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/566693002/diff/370001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): https://codereview.chromium.org/566693002/diff/370001/chrome/service/service_utility_process_host.cc#newcode138 chrome/service/service_utility_process_host.cc:138: base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE | On 2014/09/17 16:59:24, Tom Sepez ...
6 years, 3 months ago (2014-09-17 17:40:38 UTC) #39
Will Harris
LGTM for sandbox policies in service_utility_process_host.cc - they don't alter the security behavior, in fact ...
6 years, 3 months ago (2014-09-17 17:56:06 UTC) #40
Tom Sepez
Messages LGTM.
6 years, 3 months ago (2014-09-17 20:30:49 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/566693002/380001
6 years, 3 months ago (2014-09-17 20:32:11 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/14800)
6 years, 3 months ago (2014-09-17 21:49:09 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/566693002/380001
6 years, 3 months ago (2014-09-17 21:50:51 UTC) #47
commit-bot: I haz the power
Committed patchset #12 (id:380001) as eb3b645e9c6996c478f51256d167f0a8e52094ae
6 years, 3 months ago (2014-09-17 22:15:26 UTC) #48
commit-bot: I haz the power
6 years, 3 months ago (2014-09-17 22:16:01 UTC) #49
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/34cea56676e4d4cad6710906c23c5d5260d12be7
Cr-Commit-Position: refs/heads/master@{#295360}

Powered by Google App Engine
This is Rietveld 408576698