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

Issue 6696076: Adding CreateFromData to NativeMetafileFactory (Closed)

Created:
9 years, 9 months ago by dpapad
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Adding CreateFromData to NativeMetafileFactory Also making Create method calling Init on the metafile before returning it. Usually clients of the NativeMetafileFactory call Create and the Init or InitFromData on the object to initialize it. Now the returned object will already be initialized. BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=79475

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fixing memory leak and style #

Patch Set 3 : Rebasing #

Total comments: 10

Patch Set 4 : Addressing comments, fixing mac unitests. #

Total comments: 6

Patch Set 5 : Addressing comments #

Total comments: 3

Patch Set 6 : Using scoped_ptr in Create/CreateFromData #

Patch Set 7 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -16 lines) Patch
M chrome/renderer/mock_printer.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/renderer/print_web_view_helper_linux.cc View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/renderer/print_web_view_helper_mac.mm View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/print_web_view_helper_win.cc View 1 2 3 4 5 6 3 chunks +0 lines, -3 lines 0 comments Download
M printing/image.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M printing/native_metafile_factory.h View 1 2 3 1 chunk +13 lines, -1 line 0 comments Download
M printing/native_metafile_factory.cc View 1 2 3 4 5 2 chunks +20 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
dpapad
http://codereview.chromium.org/6696076/diff/1/chrome/renderer/print_web_view_helper_linux.cc File chrome/renderer/print_web_view_helper_linux.cc (left): http://codereview.chromium.org/6696076/diff/1/chrome/renderer/print_web_view_helper_linux.cc#oldcode174 chrome/renderer/print_web_view_helper_linux.cc:174: metafile->Init(); Now the metafile is already initialized before this ...
9 years, 9 months ago (2011-03-24 19:54:04 UTC) #1
vandebo (ex-Chrome)
http://codereview.chromium.org/6696076/diff/5001/chrome/renderer/mock_printer.cc File chrome/renderer/mock_printer.cc (right): http://codereview.chromium.org/6696076/diff/5001/chrome/renderer/mock_printer.cc#newcode143 chrome/renderer/mock_printer.cc:143: if (!metafile.get()) This one, we probably want to CHECK(metafile.get()) ...
9 years, 9 months ago (2011-03-24 20:11:55 UTC) #2
dpapad
http://codereview.chromium.org/6696076/diff/5001/chrome/renderer/mock_printer.cc File chrome/renderer/mock_printer.cc (right): http://codereview.chromium.org/6696076/diff/5001/chrome/renderer/mock_printer.cc#newcode143 chrome/renderer/mock_printer.cc:143: if (!metafile.get()) On 2011/03/24 20:11:55, vandebo wrote: > This ...
9 years, 9 months ago (2011-03-24 21:08:14 UTC) #3
vandebo (ex-Chrome)
http://codereview.chromium.org/6696076/diff/5003/chrome/renderer/print_web_view_helper_mac.mm File chrome/renderer/print_web_view_helper_mac.mm (right): http://codereview.chromium.org/6696076/diff/5003/chrome/renderer/print_web_view_helper_mac.mm#newcode23 chrome/renderer/print_web_view_helper_mac.mm:23: CHECK(metafile.get()); Doing the same thing as before is fine ...
9 years, 9 months ago (2011-03-24 21:21:58 UTC) #4
dpapad
On 2011/03/24 21:21:58, vandebo wrote: > http://codereview.chromium.org/6696076/diff/5003/chrome/renderer/print_web_view_helper_mac.mm > File chrome/renderer/print_web_view_helper_mac.mm (right): > > http://codereview.chromium.org/6696076/diff/5003/chrome/renderer/print_web_view_helper_mac.mm#newcode23 > ...
9 years, 9 months ago (2011-03-24 21:39:12 UTC) #5
vandebo (ex-Chrome)
On 2011/03/24 21:39:12, dpapad wrote: > On 2011/03/24 21:21:58, vandebo wrote: http://codereview.chromium.org/6696076/diff/5003/printing/native_metafile_factory.cc#newcode39 > > printing/native_metafile_factory.cc:39: ...
9 years, 9 months ago (2011-03-24 21:46:14 UTC) #6
dpapad
http://codereview.chromium.org/6696076/diff/5003/chrome/renderer/print_web_view_helper_mac.mm File chrome/renderer/print_web_view_helper_mac.mm (right): http://codereview.chromium.org/6696076/diff/5003/chrome/renderer/print_web_view_helper_mac.mm#newcode23 chrome/renderer/print_web_view_helper_mac.mm:23: CHECK(metafile.get()); On 2011/03/24 21:21:58, vandebo wrote: > Doing the ...
9 years, 9 months ago (2011-03-24 22:02:37 UTC) #7
vandebo (ex-Chrome)
http://codereview.chromium.org/6696076/diff/19/printing/native_metafile_factory.cc File printing/native_metafile_factory.cc (right): http://codereview.chromium.org/6696076/diff/19/printing/native_metafile_factory.cc#newcode19 printing/native_metafile_factory.cc:19: NativeMetafile* metafile = CreateNewMetafile(); You could make metafile a ...
9 years, 9 months ago (2011-03-24 22:15:42 UTC) #8
dpapad
http://codereview.chromium.org/6696076/diff/19/printing/native_metafile_factory.cc File printing/native_metafile_factory.cc (right): http://codereview.chromium.org/6696076/diff/19/printing/native_metafile_factory.cc#newcode19 printing/native_metafile_factory.cc:19: NativeMetafile* metafile = CreateNewMetafile(); On 2011/03/24 22:15:42, vandebo wrote: ...
9 years, 9 months ago (2011-03-24 22:37:53 UTC) #9
vandebo (ex-Chrome)
9 years, 9 months ago (2011-03-24 22:39:36 UTC) #10
LGTM

Powered by Google App Engine
This is Rietveld 408576698