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

Issue 203062: Linux: print page to file rather than using shared memory to send it to the b... (Closed)

Created:
11 years, 3 months ago by Evan Stade
Modified:
9 years, 6 months ago
Reviewers:
myhuang, M-A Ruel, tony
CC:
chromium-reviews_googlegroups.com, John Grabowski, jam, pam+watch_chromium.org, darin (slow to review), brettw, Ben Goodger (Google)
Visibility:
Public.

Description

Linux: print page to file rather than using shared memory to send it to the browser. BUG=9847 adapted from patch by <minyu.huang [at] gmail> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26308

Patch Set 1 #

Total comments: 28

Patch Set 2 : '' #

Patch Set 3 : maruel comments #

Patch Set 4 : minus singleton #

Total comments: 2

Patch Set 5 : '' #

Patch Set 6 : indentation #

Total comments: 1

Patch Set 7 : singleton++ #

Patch Set 8 : unittest #

Total comments: 2

Patch Set 9 : style #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -160 lines) Patch
M base/file_util.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M base/file_util_posix.cc View 1 2 3 4 5 6 7 8 1 chunk +14 lines, -11 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.h View 1 2 3 4 5 6 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 2 3 4 5 6 2 chunks +4 lines, -25 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter_gtk.cc View 2 3 4 5 6 7 8 3 chunks +63 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 5 6 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/common/temp_scaffolding_stubs.h View 1 2 3 4 5 6 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/common/temp_scaffolding_stubs.cc View 1 2 3 4 5 6 2 chunks +0 lines, -48 lines 0 comments Download
M chrome/renderer/print_web_view_helper_linux.cc View 1 2 3 4 5 6 2 chunks +37 lines, -51 lines 0 comments Download
M printing/pdf_ps_metafile_linux.h View 1 2 3 4 5 6 2 chunks +7 lines, -3 lines 0 comments Download
M printing/pdf_ps_metafile_linux.cc View 1 2 3 4 5 6 3 chunks +15 lines, -7 lines 0 comments Download
M printing/pdf_ps_metafile_linux_unittest.cc View 3 chunks +13 lines, -4 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Evan Stade
11 years, 3 months ago (2009-09-14 22:25:57 UTC) #1
tony
http://codereview.chromium.org/203062/diff/1/10 File base/file_util.h (right): http://codereview.chromium.org/203062/diff/1/10#newcode372 Line 372: int WriteFile(const int fd, const char* data, int ...
11 years, 3 months ago (2009-09-14 23:06:57 UTC) #2
Evan Stade
http://codereview.chromium.org/203062/diff/1/10 File base/file_util.h (right): http://codereview.chromium.org/203062/diff/1/10#newcode372 Line 372: int WriteFile(const int fd, const char* data, int ...
11 years, 3 months ago (2009-09-14 23:18:20 UTC) #3
myhuang
http://codereview.chromium.org/203062/diff/1/5 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/203062/diff/1/5#newcode730 Line 730: (*temp_file_fd).fd = *fd_in_browser = -1; On 2009/09/14 23:18:20, ...
11 years, 3 months ago (2009-09-14 23:40:37 UTC) #4
Evan Stade
http://codereview.chromium.org/203062/diff/1/5 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/203062/diff/1/5#newcode743 Line 743: MapFd2FilePath* g_fd2filepath = Singleton<MapFd2FilePath>::get(); On 2009/09/14 23:40:38, myhuang ...
11 years, 3 months ago (2009-09-14 23:48:34 UTC) #5
M-A Ruel
http://codereview.chromium.org/203062/diff/1/10 File base/file_util.h (right): http://codereview.chromium.org/203062/diff/1/10#newcode372 Line 372: int WriteFile(const int fd, const char* data, int ...
11 years, 3 months ago (2009-09-15 01:07:17 UTC) #6
myhuang
http://codereview.chromium.org/203062/diff/1/9 File chrome/renderer/print_web_view_helper_linux.cc (right): http://codereview.chromium.org/203062/diff/1/9#newcode101 Line 101: // and the browser will save this PDF ...
11 years, 3 months ago (2009-09-15 01:19:06 UTC) #7
M-A Ruel
http://codereview.chromium.org/203062/diff/1/9 File chrome/renderer/print_web_view_helper_linux.cc (right): http://codereview.chromium.org/203062/diff/1/9#newcode101 Line 101: // and the browser will save this PDF ...
11 years, 3 months ago (2009-09-15 01:28:02 UTC) #8
myhuang
http://codereview.chromium.org/203062/diff/1/9 File chrome/renderer/print_web_view_helper_linux.cc (right): http://codereview.chromium.org/203062/diff/1/9#newcode101 Line 101: // and the browser will save this PDF ...
11 years, 3 months ago (2009-09-15 01:35:05 UTC) #9
Evan Stade
http://codereview.chromium.org/203062/diff/1/9 File chrome/renderer/print_web_view_helper_linux.cc (right): http://codereview.chromium.org/203062/diff/1/9#newcode101 Line 101: // and the browser will save this PDF ...
11 years, 3 months ago (2009-09-15 01:35:34 UTC) #10
myhuang
http://codereview.chromium.org/203062/diff/1/9 File chrome/renderer/print_web_view_helper_linux.cc (right): http://codereview.chromium.org/203062/diff/1/9#newcode101 Line 101: // and the browser will save this PDF ...
11 years, 3 months ago (2009-09-15 01:53:46 UTC) #11
Evan Stade
moved resource_message_filter code to resource_message_filter_gtk
11 years, 3 months ago (2009-09-15 03:33:52 UTC) #12
Evan Stade
sorry, somehow didn't see your comments. http://codereview.chromium.org/203062/diff/1/10 File base/file_util.h (right): http://codereview.chromium.org/203062/diff/1/10#newcode372 Line 372: int WriteFile(const ...
11 years, 3 months ago (2009-09-15 18:57:34 UTC) #13
M-A Ruel
On 2009/09/15 18:57:34, Evan Stade wrote: > Like Min, I am skeptical that it's worth ...
11 years, 3 months ago (2009-09-15 20:28:39 UTC) #14
Evan Stade
Changed the types of the messages. http://codereview.chromium.org/203062/diff/22/1024 File chrome/browser/renderer_host/resource_message_filter_gtk.cc (right): http://codereview.chromium.org/203062/diff/22/1024#newcode34 Line 34: static FdMap ...
11 years, 3 months ago (2009-09-15 20:46:56 UTC) #15
M-A Ruel
On 2009/09/15 20:46:56, Evan Stade wrote: > ok. I can change it to that if ...
11 years, 3 months ago (2009-09-15 20:49:25 UTC) #16
myhuang
On 2009/09/15 20:49:25, Marc-Antoine Ruel wrote: > On 2009/09/15 20:46:56, Evan Stade wrote: > > ...
11 years, 3 months ago (2009-09-15 20:54:45 UTC) #17
myhuang
On 2009/09/15 20:54:45, myhuang wrote: > On 2009/09/15 20:49:25, Marc-Antoine Ruel wrote: > > On ...
11 years, 3 months ago (2009-09-15 20:55:40 UTC) #18
M-A Ruel
On 2009/09/15 20:55:40, myhuang wrote: > On 2009/09/15 20:54:45, myhuang wrote: > > In this ...
11 years, 3 months ago (2009-09-15 20:57:33 UTC) #19
M-A Ruel
and lgtm after this change and Singleton. http://codereview.chromium.org/203062/diff/6005/6015 File base/file_util_posix.cc (right): http://codereview.chromium.org/203062/diff/6005/6015#newcode522 Line 522: ssize_t ...
11 years, 3 months ago (2009-09-15 20:57:50 UTC) #20
Evan Stade
On Tue, Sep 15, 2009 at 1:55 PM, <minyu.huang@gmail.com> wrote: > On 2009/09/15 20:54:45, myhuang ...
11 years, 3 months ago (2009-09-15 20:58:33 UTC) #21
myhuang
On 2009/09/15 20:58:33, Evan Stade wrote: > On Tue, Sep 15, 2009 at 1:55 PM, ...
11 years, 3 months ago (2009-09-15 21:03:24 UTC) #22
Evan Stade
sorry, I noticed a unit test needed updating. Take a quick look at pdf_ps_metafile_linux_unittest.cc ?
11 years, 3 months ago (2009-09-15 23:30:36 UTC) #23
tony
pdf_ps_metafile_linux_unittest.cc LGTM
11 years, 3 months ago (2009-09-15 23:36:35 UTC) #24
M-A Ruel
11 years, 3 months ago (2009-09-15 23:42:52 UTC) #25
Please commit before I see more unnecessary changes.

http://codereview.chromium.org/203062/diff/7003/7013
File base/file_util_posix.cc (right):

http://codereview.chromium.org/203062/diff/7003/7013#newcode525
Line 525: for (; bytes_written_total < size;
nit: Ahhh if you had read the style guide correctly, you'd have seen that
bytes_written_partial should be defined local to the for loop.

After that, you know, that code will be mighty. :)

http://codereview.chromium.org/203062/diff/7003/7015
File chrome/browser/renderer_host/resource_message_filter_gtk.cc (right):

http://codereview.chromium.org/203062/diff/7003/7015#newcode33
Line 33: public:
nit: You should paste code I write, the public: was to trick you off. :)

Ok it wasn't to trick you, I just replaced class for struct at the last moment.

Powered by Google App Engine
This is Rietveld 408576698