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

Issue 153002: NaCl-Chrome integration - step 1 (Closed)

Created:
11 years, 5 months ago by gregoryd
Modified:
9 years, 7 months ago
CC:
neha, sehr (please use chromium), chromium-reviews_googlegroups.com, native-client-reviews_googlegroups.com, bradnelson
Visibility:
Public.

Description

First step towards NaCl-Chrome integration:1. NaCl plugin becomes a built-in plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "--internal-nacl" is required to enable the built-in NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandboxCommitted: http://src.chromium.org/viewvc/chrome?view=rev&revision=27315 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27324 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27397 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27445

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 59

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 24

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Patch Set 22 : '' #

Patch Set 23 : '' #

Patch Set 24 : '' #

Total comments: 20

Patch Set 25 : '' #

Patch Set 26 : '' #

Total comments: 2

Patch Set 27 : '' #

Patch Set 28 : '' #

Total comments: 36

Patch Set 29 : '' #

Patch Set 30 : '' #

Patch Set 31 : '' #

Total comments: 4

Patch Set 32 : '' #

Patch Set 33 : '' #

Patch Set 34 : '' #

Patch Set 35 : '' #

Patch Set 36 : '' #

Patch Set 37 : '' #

Total comments: 6

Patch Set 38 : '' #

Patch Set 39 : '' #

Patch Set 40 : '' #

Patch Set 41 : '' #

Patch Set 42 : '' #

Patch Set 43 : '' #

Patch Set 44 : '' #

Patch Set 45 : '' #

Patch Set 46 : '' #

Patch Set 47 : '' #

Patch Set 48 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+516 lines, -42 lines) Patch
M DEPS View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +1 line, -1 line 0 comments Download
M base/format_macros.h View 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/app/chrome_dll_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/nacl_process_host.h View 3 4 5 6 7 8 9 10 11 12 13 38 39 45 47 1 chunk +55 lines, -0 lines 0 comments Download
A chrome/browser/nacl_process_host.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 38 39 45 47 1 chunk +187 lines, -0 lines 0 comments Download
M chrome/browser/plugin_service.cc View 1 2 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/sandbox_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 3 chunks +7 lines, -1 line 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 8 chunks +91 lines, -0 lines 0 comments Download
M chrome/common/child_process_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +6 lines, -0 lines 0 comments Download
A chrome/common/nacl_messages.h View 3 4 5 6 7 8 9 10 38 39 45 47 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/common/nacl_messages_internal.h View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 38 39 45 47 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/common/nacl_types.h View 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 38 39 45 47 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/common/sandbox_init_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +1 line, -0 lines 0 comments Download
M chrome/nacl/nacl_main.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +1 line, -1 line 0 comments Download
M chrome/nacl/nacl_thread.h View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +4 lines, -7 lines 0 comments Download
M chrome/nacl/nacl_thread.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/nacl/sel_main.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +1 line, -3 lines 0 comments Download
M chrome/renderer/render_process.h View 3 4 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/renderer/render_process.cc View 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 3 chunks +18 lines, -0 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +7 lines, -1 line 0 comments Download
M ipc/ipc_message_utils.h View 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/plugins/plugin_lib.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 2 chunks +3 lines, -1 line 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl_win.cc View 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +28 lines, -23 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
gregoryd
11 years, 5 months ago (2009-07-02 01:59:09 UTC) #1
jam
http://codereview.chromium.org/153002/diff/1014/2026 File build/build_config.h (right): http://codereview.chromium.org/153002/diff/1014/2026#newcode20 Line 20: #define NACL_WINDOWS 0 why does this need to ...
11 years, 5 months ago (2009-07-02 22:24:09 UTC) #2
gregoryd
Handled all comments, still need to check the impact on chrome.dll size. The CL now ...
11 years, 5 months ago (2009-07-16 01:20:07 UTC) #3
gregoryd
Adding chromium-reviews and native-client-reviews
11 years, 5 months ago (2009-07-16 01:44:19 UTC) #4
jam
http://codereview.chromium.org/153002/diff/3060/3083 File chrome/browser/nacl_process_host.cc (right): http://codereview.chromium.org/153002/diff/3060/3083#newcode27 Line 27: const int descriptor, nit: spacing is off. same ...
11 years, 5 months ago (2009-07-24 00:02:16 UTC) #5
gregoryd
Mac build still fails due to a gyp problem that will be fixed soon. http://codereview.chromium.org/153002/diff/3060/3083 ...
11 years, 3 months ago (2009-09-03 23:12:07 UTC) #6
gregoryd
This change now builds successfully on all platforms.
11 years, 3 months ago (2009-09-16 00:21:54 UTC) #7
gregoryd
Looks like a minor fix in our gyp fixed the problem. The trybots are running ...
11 years, 3 months ago (2009-09-16 23:56:13 UTC) #8
jam
almost there, just a few comments. also re "--no-sandbox", ideally it'd be set automatically if ...
11 years, 3 months ago (2009-09-17 19:17:57 UTC) #9
jam
http://codereview.chromium.org/153002/diff/25001/26003 File webkit/glue/plugins/plugin_list.cc (right): http://codereview.chromium.org/153002/diff/25001/26003#newcode177 Line 177: // platform-specific LoadInternalPlugins() function. LoadInternalPlugins doesn't exist anymore, ...
11 years, 3 months ago (2009-09-17 19:26:59 UTC) #10
gregoryd
http://codereview.chromium.org/153002/diff/25001/26025 File chrome/browser/nacl_process_host.cc (right): http://codereview.chromium.org/153002/diff/25001/26025#newcode87 Line 87: const nacl::Handle handle) { On 2009/09/17 19:17:57, John ...
11 years, 3 months ago (2009-09-17 20:40:29 UTC) #11
jam
http://codereview.chromium.org/153002/diff/26038/25019 File webkit/glue/plugins/webplugin_delegate_impl.h (right): http://codereview.chromium.org/153002/diff/26038/25019#newcode132 Line 132: void SetSharedQuirks(); This function is not needed at ...
11 years, 3 months ago (2009-09-17 21:37:08 UTC) #12
gregoryd
I found that this flag has an effect also on Linux - see webplugin_delegate_impl.cc line ...
11 years, 3 months ago (2009-09-17 21:51:20 UTC) #13
gregoryd
http://codereview.chromium.org/153002/diff/26038/25019 File webkit/glue/plugins/webplugin_delegate_impl.h (right): http://codereview.chromium.org/153002/diff/26038/25019#newcode132 Line 132: void SetSharedQuirks(); On 2009/09/17 21:37:08, John Abd-El-Malek wrote: ...
11 years, 3 months ago (2009-09-17 22:21:43 UTC) #14
jam
lgtm
11 years, 3 months ago (2009-09-17 22:26:38 UTC) #15
darin (slow to review)
the tree was closed... i saw that this was landing... here's some more review feedback ...
11 years, 3 months ago (2009-09-18 03:52:26 UTC) #16
jam
Sorry for the late reply, but as Marshall pointed out in another review, the changes ...
11 years, 3 months ago (2009-09-18 17:58:50 UTC) #17
jam
hey guys, so it looks like Darin has a few small comments that should be ...
11 years, 3 months ago (2009-09-18 20:30:27 UTC) #18
gregoryd
The new revision of this CL can be found at http://codereview.chromium.org/219023 http://codereview.chromium.org/153002/diff/29003/29014 File chrome/browser/renderer_host/resource_message_filter.cc (right): ...
11 years, 3 months ago (2009-09-24 18:28:45 UTC) #19
jam
Hi, this is missing the changes I had suggested/made regarding not needing to change plugin_list ...
11 years, 3 months ago (2009-09-25 17:35:27 UTC) #20
gregoryd
Removed the changes to plugin_list files. Regarding NaClService - it just seems as a good ...
11 years, 3 months ago (2009-09-25 18:35:29 UTC) #21
jam
http://codereview.chromium.org/153002/diff/29003/29014 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/153002/diff/29003/29014#newcode588 Line 588: nacl_host->Launch(this, channel_descriptor, handle); On 2009/09/24 18:28:45, gregoryd wrote: ...
11 years, 3 months ago (2009-09-25 19:36:06 UTC) #22
gregoryd
http://codereview.chromium.org/153002/diff/29003/29014 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/153002/diff/29003/29014#newcode588 Line 588: nacl_host->Launch(this, channel_descriptor, handle); I suspected something like this ...
11 years, 3 months ago (2009-09-25 19:54:29 UTC) #23
gregoryd
Uploaded the new version http://codereview.chromium.org/153002/diff/41001/41014 File chrome/browser/nacl_process_host.cc (right): http://codereview.chromium.org/153002/diff/41001/41014#newcode170 Line 170: channel); On 2009/09/25 19:36:06, ...
11 years, 3 months ago (2009-09-25 20:28:15 UTC) #24
jam
http://codereview.chromium.org/153002/diff/29003/29014 File chrome/browser/renderer_host/resource_message_filter.cc (right): http://codereview.chromium.org/153002/diff/29003/29014#newcode588 Line 588: nacl_host->Launch(this, channel_descriptor, handle); On 2009/09/25 19:54:29, gregoryd wrote: ...
11 years, 3 months ago (2009-09-25 20:48:16 UTC) #25
gregoryd
Done. The change in chrome depends on a change to native_client ( http://codereview.chromium.org/245015/show) that will ...
11 years, 3 months ago (2009-09-26 00:20:42 UTC) #26
jam
lgtm
11 years, 3 months ago (2009-09-26 00:43:54 UTC) #27
darin (slow to review)
11 years, 3 months ago (2009-09-26 03:45:13 UTC) #28
LGTM2.  please address these nits before committing:

http://codereview.chromium.org/153002/diff/45032/44057
File chrome/nacl/nacl_thread.cc (right):

http://codereview.chromium.org/153002/diff/45032/44057#newcode7
Line 7: #include "build/build_config.h"
nit: it isn't necessary to include build_config.h here.

http://codereview.chromium.org/153002/diff/45032/44060
File chrome/nacl/nacl_thread.h (right):

http://codereview.chromium.org/153002/diff/45032/44060#newcode26
Line 26: void OnStartSelLdr(const int channel_descriptor,
nit: there's no benefit to passing these parameters with "const" since they are
passed by value instead of by reference.  we generally avoid the extraneous
const in cases like this since it only adds more noise.

http://codereview.chromium.org/153002/diff/45032/44060#newcode30
Line 30: scoped_ptr<NotificationService> notification_service_;
this member variable appears to be unused.  can it be removed?

http://codereview.chromium.org/153002/diff/45032/44060#newcode32
Line 32: DISALLOW_EVIL_CONSTRUCTORS(NaClThread);
nit: new code should use DISALLOW_COPY_AND_ASSIGN instead.

http://codereview.chromium.org/153002/diff/45032/44058
File chrome/nacl/sel_main.cc (right):

http://codereview.chromium.org/153002/diff/45032/44058#newcode5
Line 5: #include "build/build_config.h"
nit: build_config.h does not seem necessary here.

http://codereview.chromium.org/153002/diff/45032/44033
File webkit/glue/plugins/plugin_lib.h (right):

http://codereview.chromium.org/153002/diff/45032/44033#newcode96
Line 96: bool internal_;  // True for plugins that are built-in into chrome.dll
we also compile this same code into numerous other binaries (e.g.,
test_shell.exe), so this comment shouldn't be specific about chrome.dll.

Powered by Google App Engine
This is Rietveld 408576698