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

Issue 2919823004: Add error handling and unit test for pdf compositor service (Closed)

Created:
3 years, 6 months ago by Wei Li
Modified:
3 years, 4 months ago
CC:
Aaron Boodman, abarth-chromium, blundell+watchlist_chromium.org, chromium-reviews, darin (slow to review), droger+watchlist_chromium.org, qsr+mojo_chromium.org, sdefresne+watchlist_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add error handling and unit test for pdf compositor service Add a return status code to avoid aborting the service upon any error. Mojo verifies the validity of returned handle, will exit it is not valid. Also add unit test for this service. BUG=chromium:455764 Review-Url: https://codereview.chromium.org/2919823004 Cr-Commit-Position: refs/heads/master@{#490679} Committed: https://chromium.googlesource.com/chromium/src/+/04c36f14562dc46403c199ff9d9478101d9bc04a

Patch Set 1 #

Patch Set 2 : remove headers #

Patch Set 3 : add missing header #

Total comments: 12

Patch Set 4 : address comments #

Patch Set 5 : rebase #

Total comments: 4

Patch Set 6 : rebase #

Patch Set 7 : address Ken's comments #

Total comments: 2

Patch Set 8 : address Lei's comment #

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -8 lines) Patch
M components/printing/service/BUILD.gn View 1 2 3 4 5 6 2 chunks +47 lines, -0 lines 0 comments Download
M components/printing/service/DEPS View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M components/printing/service/pdf_compositor_impl.cc View 3 chunks +8 lines, -4 lines 0 comments Download
M components/printing/service/pdf_compositor_service.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M components/printing/service/pdf_compositor_service.cc View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
A components/printing/service/pdf_compositor_service_unittest.cc View 1 2 3 1 chunk +135 lines, -0 lines 0 comments Download
A components/printing/service/pdf_compositor_service_unittest_manifest.json View 1 chunk +17 lines, -0 lines 0 comments Download
M components/printing/service/public/cpp/pdf_compositor_client.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/printing/service/public/interfaces/pdf_compositor.mojom View 1 chunk +11 lines, -2 lines 0 comments Download
A components/printing/service/test_service_main.cc View 1 2 3 4 5 6 7 1 chunk +33 lines, -0 lines 0 comments Download
A components/test/data/printing/google.mskp View Binary file 0 comments Download

Dependent Patchsets:

Messages

Total messages: 55 (43 generated)
Wei Li
Lei, pls review Daniel, Pls do security review as I changed the .mojom file; Ken, ...
3 years, 6 months ago (2017-06-02 20:58:59 UTC) #15
Lei Zhang
https://codereview.chromium.org/2919823004/diff/40001/components/printing/service/pdf_compositor_service_unittest.cc File components/printing/service/pdf_compositor_service_unittest.cc (right): https://codereview.chromium.org/2919823004/diff/40001/components/printing/service/pdf_compositor_service_unittest.cc#newcode47 components/printing/service/pdf_compositor_service_unittest.cc:47: run_loop_.reset(new base::RunLoop()); run_loop_ = base::MakeUnique<base::RunLoop>(); https://codereview.chromium.org/2919823004/diff/40001/components/printing/service/pdf_compositor_service_unittest.cc#newcode55 components/printing/service/pdf_compositor_service_unittest.cc:55: base::SharedMemoryHandle LoadFileInSharedMemory(size_t* ...
3 years, 6 months ago (2017-06-02 21:54:09 UTC) #16
dcheng
mojom changes lgtm
3 years, 6 months ago (2017-06-05 18:40:56 UTC) #17
Wei Li
Sorry for the delay: planned to finish it while ooo, but didn't. ptal, thanks. https://codereview.chromium.org/2919823004/diff/40001/components/printing/service/pdf_compositor_service_unittest.cc ...
3 years, 5 months ago (2017-07-07 21:23:57 UTC) #22
Wei Li
gentle ping
3 years, 5 months ago (2017-07-25 04:56:29 UTC) #28
Ken Rockot(use gerrit already)
Sorry for the delay, I haven't been looking at Rietveld for a while now. LGTM ...
3 years, 5 months ago (2017-07-25 05:02:06 UTC) #29
Wei Li
thanks! https://codereview.chromium.org/2919823004/diff/100001/components/printing/service/DEPS File components/printing/service/DEPS (right): https://codereview.chromium.org/2919823004/diff/100001/components/printing/service/DEPS#newcode8 components/printing/service/DEPS:8: "+services/service_manager/public/c", # For tests only. On 2017/07/25 05:02:06, ...
3 years, 5 months ago (2017-07-26 05:08:50 UTC) #34
Lei Zhang
https://codereview.chromium.org/2919823004/diff/140001/components/printing/service/test_service_main.cc File components/printing/service/test_service_main.cc (right): https://codereview.chromium.org/2919823004/diff/140001/components/printing/service/test_service_main.cc#newcode24 components/printing/service/test_service_main.cc:24: base::DiscardableMemoryAllocator::SetInstance(&mem_allocator); Isn't this passing a pointer to an object ...
3 years, 4 months ago (2017-07-27 01:57:14 UTC) #35
Wei Li
thanks! https://codereview.chromium.org/2919823004/diff/140001/components/printing/service/test_service_main.cc File components/printing/service/test_service_main.cc (right): https://codereview.chromium.org/2919823004/diff/140001/components/printing/service/test_service_main.cc#newcode24 components/printing/service/test_service_main.cc:24: base::DiscardableMemoryAllocator::SetInstance(&mem_allocator); On 2017/07/27 01:57:14, Lei Zhang wrote: > ...
3 years, 4 months ago (2017-07-28 23:43:03 UTC) #44
Lei Zhang
lgtm
3 years, 4 months ago (2017-07-29 00:26:53 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2919823004/180001
3 years, 4 months ago (2017-07-30 01:44:24 UTC) #52
commit-bot: I haz the power
3 years, 4 months ago (2017-07-30 01:49:07 UTC) #55
Message was sent while issue was closed.
Committed patchset #9 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/04c36f14562dc46403c199ff9d94...

Powered by Google App Engine
This is Rietveld 408576698