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

Issue 2049303002: Add the UtilityProcessMojoClient class and convert SafeJsonParser (Closed)

Created:
4 years, 6 months ago by Patrick Monette
Modified:
4 years, 6 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, kinuko+watch, ben+mojo_chromium.org, jsbell+serviceworker_chromium.org, tzik, jam, abarth-chromium, darin-cc_chromium.org, blink-worker-reviews_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo, nhiroki, mkwst+moarreviews-shell_chromium.org, jochen+watch_chromium.org, michaeln, serviceworker-reviews, Aaron Boodman, kinuko+serviceworker, horo+watch_chromium.org, darin (slow to review), grt (UTC plus 2)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add the UtilityProcessMojoClient class and convert SafeJsonParser This class takes care of the mundane job of managing the utility process lifetime and connecting to the remote Mojo service in an effort to make it very easy to add new Mojo services that run on a utility process. As a first example, SafeJsonParser is converted to use this class. BUG=618459 Committed: https://crrev.com/e6f1ea1a8b2145019c3e7a7248ab1fc1d880b069 Cr-Commit-Position: refs/heads/master@{#400522}

Patch Set 1 : #

Total comments: 43

Patch Set 2 : Responding to all comments #

Total comments: 4

Patch Set 3 : comments from grt@ #

Total comments: 2

Patch Set 4 : bauerb@ comment #

Total comments: 10

Patch Set 5 : Rebase + comments #

Patch Set 6 : Merged back to one templated class #

Patch Set 7 : Comment about utility_host_ #

Patch Set 8 : Disabled test and fixed headers #

Patch Set 9 : Fix test compilation on non-Windows platforms #

Patch Set 10 : Fixed compilation 2 #

Total comments: 2

Patch Set 11 : s/mojo/Mojo #

Patch Set 12 : Fixed tests with --no-sandbox #

Patch Set 13 : Fixed android sandbox browser tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+411 lines, -103 lines) Patch
M components/safe_json/safe_json_parser_impl.h View 1 3 chunks +18 lines, -29 lines 0 comments Download
M components/safe_json/safe_json_parser_impl.cc View 1 2 3 2 chunks +54 lines, -72 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
A content/browser/utility_process_mojo_client_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +141 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A content/public/browser/utility_process_mojo_client.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +142 lines, -0 lines 0 comments Download
M content/public/test/test_mojo_app.h View 3 chunks +5 lines, -1 line 0 comments Download
M content/public/test/test_mojo_app.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M content/public/test/test_mojo_service.mojom View 1 chunk +7 lines, -0 lines 0 comments Download
M content/shell/renderer/shell_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +12 lines, -1 line 0 comments Download
M content/shell/utility/shell_content_utility_client.cc View 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (20 generated)
Patrick Monette
For context, lots of discussion here: https://codereview.chromium.org/1951983002/ amistry@ (Mojo expert) PTAL for all Mojo related ...
4 years, 6 months ago (2016-06-08 22:14:22 UTC) #4
Patrick Monette
+jam@
4 years, 6 months ago (2016-06-08 22:14:41 UTC) #6
grt (UTC plus 2)
looks good. a few comments below. https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc File components/safe_json/safe_json_parser_impl.cc (right): https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc#newcode38 components/safe_json/safe_json_parser_impl.cc:38: DCHECK(io_thread_checker_.CalledOnValidThread()); what's the ...
4 years, 6 months ago (2016-06-09 14:48:58 UTC) #8
Bernhard Bauer
https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.h File components/safe_json/safe_json_parser_impl.h (right): https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.h#newcode27 components/safe_json/safe_json_parser_impl.h:27: : public base::RefCountedThreadSafe<SafeJsonParserImpl>, Ooh, if this class now doesn't ...
4 years, 6 months ago (2016-06-09 15:16:50 UTC) #9
Anand Mistry (off Chromium)
https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.h File components/safe_json/safe_json_parser_impl.h (left): https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.h#oldcode14 components/safe_json/safe_json_parser_impl.h:14: #include "base/threading/thread_checker.h" thread_checker.h is still used. https://codereview.chromium.org/2049303002/diff/20001/content/browser/utility_process_mojo_client_browsertest.cc File content/browser/utility_process_mojo_client_browsertest.cc ...
4 years, 6 months ago (2016-06-10 11:13:55 UTC) #10
Patrick Monette
Thanks for the comments everyone. I uploaded a new patchset. PTAnL https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc File components/safe_json/safe_json_parser_impl.cc (right): ...
4 years, 6 months ago (2016-06-10 18:13:24 UTC) #11
grt (UTC plus 2)
lgtm regarding my previous comments. https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc File components/safe_json/safe_json_parser_impl.cc (right): https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc#newcode38 components/safe_json/safe_json_parser_impl.cc:38: DCHECK(io_thread_checker_.CalledOnValidThread()); On 2016/06/10 18:13:23, ...
4 years, 6 months ago (2016-06-10 19:03:06 UTC) #12
Patrick Monette
https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc File components/safe_json/safe_json_parser_impl.cc (right): https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc#newcode38 components/safe_json/safe_json_parser_impl.cc:38: DCHECK(io_thread_checker_.CalledOnValidThread()); On 2016/06/10 19:03:06, grt (slow) wrote: > On ...
4 years, 6 months ago (2016-06-10 21:29:46 UTC) #13
Bernhard Bauer
lgtm https://codereview.chromium.org/2049303002/diff/60001/components/safe_json/safe_json_parser_impl.cc File components/safe_json/safe_json_parser_impl.cc (right): https://codereview.chromium.org/2049303002/diff/60001/components/safe_json/safe_json_parser_impl.cc#newcode73 components/safe_json/safe_json_parser_impl.cc:73: const base::Value* value = NULL; nullptr
4 years, 6 months ago (2016-06-13 08:34:53 UTC) #14
Anand Mistry (off Chromium)
https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc File components/safe_json/safe_json_parser_impl.cc (right): https://codereview.chromium.org/2049303002/diff/20001/components/safe_json/safe_json_parser_impl.cc#newcode38 components/safe_json/safe_json_parser_impl.cc:38: DCHECK(io_thread_checker_.CalledOnValidThread()); On 2016/06/10 21:29:46, Patrick Monette wrote: > On ...
4 years, 6 months ago (2016-06-14 00:32:29 UTC) #15
michaeln
some drive by comments about smart ptr usage https://codereview.chromium.org/2049303002/diff/80001/content/browser/utility_process_mojo_client_impl.cc File content/browser/utility_process_mojo_client_impl.cc (right): https://codereview.chromium.org/2049303002/diff/80001/content/browser/utility_process_mojo_client_impl.cc#newcode14 content/browser/utility_process_mojo_client_impl.cc:14: // ...
4 years, 6 months ago (2016-06-14 18:37:27 UTC) #17
Patrick Monette
As per jam@ decision, I merged back the the UtilityProcessMojoClient classes into one. Apart for ...
4 years, 6 months ago (2016-06-14 21:23:33 UTC) #18
michaeln
https://codereview.chromium.org/2049303002/diff/80001/content/browser/utility_process_mojo_client_impl.cc File content/browser/utility_process_mojo_client_impl.cc (right): https://codereview.chromium.org/2049303002/diff/80001/content/browser/utility_process_mojo_client_impl.cc#newcode48 content/browser/utility_process_mojo_client_impl.cc:48: utility_host_ = UtilityProcessHost::Create(nullptr, nullptr)->AsWeakPtr(); On 2016/06/14 21:23:32, Patrick Monette ...
4 years, 6 months ago (2016-06-14 22:10:51 UTC) #20
Anand Mistry (off Chromium)
LGTM Cool!
4 years, 6 months ago (2016-06-15 00:12:59 UTC) #21
Patrick Monette
https://codereview.chromium.org/2049303002/diff/80001/content/browser/utility_process_mojo_client_impl.cc File content/browser/utility_process_mojo_client_impl.cc (right): https://codereview.chromium.org/2049303002/diff/80001/content/browser/utility_process_mojo_client_impl.cc#newcode48 content/browser/utility_process_mojo_client_impl.cc:48: utility_host_ = UtilityProcessHost::Create(nullptr, nullptr)->AsWeakPtr(); On 2016/06/14 22:10:50, michaeln wrote: ...
4 years, 6 months ago (2016-06-15 15:28:09 UTC) #22
Patrick Monette
jam@ PTAL
4 years, 6 months ago (2016-06-15 21:34:59 UTC) #23
jam
lgtm https://codereview.chromium.org/2049303002/diff/220001/content/public/browser/utility_process_mojo_client.h File content/public/browser/utility_process_mojo_client.h (right): https://codereview.chromium.org/2049303002/diff/220001/content/public/browser/utility_process_mojo_client.h#newcode23 content/public/browser/utility_process_mojo_client.h:23: // Implements a client to a mojo service ...
4 years, 6 months ago (2016-06-17 15:47:34 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2049303002/240001
4 years, 6 months ago (2016-06-17 15:55:28 UTC) #28
Patrick Monette
Thanks for the reviews! https://codereview.chromium.org/2049303002/diff/220001/content/public/browser/utility_process_mojo_client.h File content/public/browser/utility_process_mojo_client.h (right): https://codereview.chromium.org/2049303002/diff/220001/content/public/browser/utility_process_mojo_client.h#newcode23 content/public/browser/utility_process_mojo_client.h:23: // Implements a client to ...
4 years, 6 months ago (2016-06-17 15:58:32 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/89525)
4 years, 6 months ago (2016-06-17 17:01:46 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2049303002/240001
4 years, 6 months ago (2016-06-17 17:18:50 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/179244)
4 years, 6 months ago (2016-06-17 18:10:28 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2049303002/260001
4 years, 6 months ago (2016-06-17 18:38:11 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/89608)
4 years, 6 months ago (2016-06-17 20:08:52 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2049303002/280001
4 years, 6 months ago (2016-06-17 20:46:03 UTC) #43
commit-bot: I haz the power
Committed patchset #13 (id:280001)
4 years, 6 months ago (2016-06-17 22:14:35 UTC) #45
commit-bot: I haz the power
4 years, 6 months ago (2016-06-17 22:15:43 UTC) #47
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/e6f1ea1a8b2145019c3e7a7248ab1fc1d880b069
Cr-Commit-Position: refs/heads/master@{#400522}

Powered by Google App Engine
This is Rietveld 408576698