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

Issue 8414020: Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing... (Closed)

Created:
9 years, 1 month ago by jam
Modified:
8 years, 9 months ago
CC:
chromium-reviews, sadrul, Paweł Hajdan Jr., apatrick_chromium, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing this. -got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo -got rid of the duplicated code to initialize the broker -since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs. BUG=98716 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107863

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 9

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -550 lines) Patch
M base/mac/scoped_nsautorelease_pool.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -15 lines 1 comment Download
M base/message_pump_default.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 1 comment Download
M base/message_pump_libevent.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -1 line 0 comments Download
M base/shared_memory_unittest.cc View 1 2 3 4 5 6 7 4 chunks +10 lines, -3 lines 0 comments Download
M base/test/test_suite.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -1 line 0 comments Download
M chrome/app/chrome_exe_main_win.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/chrome_browser_main_unittest.cc View 1 2 3 4 5 6 7 5 chunks +4 lines, -12 lines 0 comments Download
M chrome/browser/ui/panels/base_panel_browser_test.cc View 1 2 3 4 5 6 7 4 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/panel_app_browsertest.cc View 1 2 3 4 5 6 7 4 chunks +6 lines, -1 line 0 comments Download
M chrome/chrome_exe.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/service_process_util.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/nacl/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/nacl/nacl_exe_win_64.cc View 1 2 3 4 5 6 7 4 chunks +6 lines, -30 lines 0 comments Download
M chrome/nacl/nacl_main.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/nacl/nacl_main_platform_delegate_mac.mm View 1 2 3 4 5 6 7 3 chunks +4 lines, -8 lines 0 comments Download
M chrome/nacl/nacl_main_platform_delegate_win.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/service/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/service/service_main.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/test/base/chrome_test_launcher.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/base/chrome_test_suite.cc View 1 2 3 4 5 6 7 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 3 4 5 6 7 4 chunks +16 lines, -1 line 0 comments Download
M chrome/test/pyautolib/pyautolib.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -1 line 0 comments Download
M chrome/test/pyautolib/pyautolib.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/webdriver/commands/command.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M content/app/content_main.cc View 1 2 3 4 5 6 7 5 chunks +18 lines, -24 lines 0 comments Download
D content/app/startup_helper_win.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -34 lines 0 comments Download
M content/app/startup_helper_win.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_main.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -28 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/common/main_function_params.h View 1 2 3 4 5 6 7 1 chunk +20 lines, -8 lines 0 comments Download
A + content/common/sandbox_init_mac.cc View 3 chunks +9 lines, -3 lines 0 comments Download
A + content/common/sandbox_init_win.cc View 1 chunk +37 lines, -24 lines 0 comments Download
D content/common/sandbox_init_wrapper.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -72 lines 0 comments Download
D content/common/sandbox_init_wrapper_linux.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -13 lines 0 comments Download
D content/common/sandbox_init_wrapper_mac.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -67 lines 0 comments Download
D content/common/sandbox_init_wrapper_win.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -50 lines 0 comments Download
M content/content_app.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 2 chunks +3 lines, -4 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/plugin/plugin_main.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/ppapi_plugin/ppapi_broker_main.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/ppapi_plugin/ppapi_plugin_main.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M content/ppapi_plugin/ppapi_thread.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -5 lines 0 comments Download
A + content/public/app/startup_helper_win.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/public/common/sandbox_init.h View 1 1 chunk +20 lines, -56 lines 0 comments Download
M content/renderer/renderer_main.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/renderer_main_platform_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M content/renderer/renderer_main_platform_delegate_mac.mm View 1 2 3 4 5 6 7 3 chunks +3 lines, -5 lines 0 comments Download
M content/renderer/renderer_main_platform_delegate_win.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M content/shell/shell_main.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/test/browser_test_base.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -4 lines 0 comments Download
M content/test/content_browser_test.cc View 1 2 3 4 5 6 7 3 chunks +13 lines, -1 line 0 comments Download
M content/test/content_test_launcher.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/test/render_view_test.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -2 lines 0 comments Download
M content/test/render_view_test.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -4 lines 0 comments Download
M content/test/test_launcher.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -1 line 0 comments Download
M content/utility/utility_main.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M content/worker/worker_main.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/client/cmd_buffer_helper_test.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -1 line 0 comments Download
M gpu/command_buffer/client/fenced_allocator_test.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -1 line 0 comments Download
M gpu/command_buffer/client/mapped_memory_unittest.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -1 line 0 comments Download
M gpu/command_buffer/client/ring_buffer_test.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gpu_scheduler_unittest.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -1 line 0 comments Download
M remoting/host/simple_host_process.cc View 1 2 3 4 5 6 7 4 chunks +7 lines, -9 lines 0 comments Download
M sandbox/src/sandbox_types.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -7 lines 0 comments Download
M webkit/tools/test_shell/run_all_tests.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
jam
9 years, 1 month ago (2011-10-28 17:56:49 UTC) #1
Brad Chen (chromium)
On 2011/10/28 17:56:49, John Abd-El-Malek wrote: Sadly, nacl_integration tests are off in the bots right ...
9 years, 1 month ago (2011-10-28 23:39:28 UTC) #2
jam
On 2011/10/28 23:39:28, Brad Chen (chromium) wrote: > On 2011/10/28 17:56:49, John Abd-El-Malek wrote: > ...
9 years, 1 month ago (2011-10-29 00:37:45 UTC) #3
cpu_(ooo_6.6-7.5)
http://codereview.chromium.org/8414020/diff/1099/content/ppapi_plugin/ppapi_thread.cc File content/ppapi_plugin/ppapi_thread.cc (right): http://codereview.chromium.org/8414020/diff/1099/content/ppapi_plugin/ppapi_thread.cc#newcode204 content/ppapi_plugin/ppapi_thread.cc:204: if (!content::InitializeSandbox()) I normally use that if() macro, needs ...
9 years, 1 month ago (2011-10-29 01:02:35 UTC) #4
cpu_(ooo_6.6-7.5)
first off nice refactoring. In general lgtm, some nits below, second, please manually try --no-sandbox ...
9 years, 1 month ago (2011-10-29 01:35:39 UTC) #5
jam
http://codereview.chromium.org/8414020/diff/1099/chrome/test/base/in_process_browser_test.cc File chrome/test/base/in_process_browser_test.cc (right): http://codereview.chromium.org/8414020/diff/1099/chrome/test/base/in_process_browser_test.cc#newcode286 chrome/test/base/in_process_browser_test.cc:286: #if defined(OS_MACOSX) On 2011/10/29 01:35:39, cpu wrote: > I ...
9 years, 1 month ago (2011-10-29 01:49:10 UTC) #6
jam
http://codereview.chromium.org/8414020/diff/1099/content/renderer/renderer_main_platform_delegate.h File content/renderer/renderer_main_platform_delegate.h (right): http://codereview.chromium.org/8414020/diff/1099/content/renderer/renderer_main_platform_delegate.h#newcode15 content/renderer/renderer_main_platform_delegate.h:15: #include "base/basictypes.h" On 2011/10/29 01:49:10, John Abd-El-Malek wrote: > ...
9 years, 1 month ago (2011-10-29 02:13:59 UTC) #7
Mark Mentovai
It looks like you masked unwanted “cleanup” in a larger change, and didn’t go through ...
8 years, 9 months ago (2012-03-26 16:23:16 UTC) #8
Mark Mentovai
John Abd-El-Malek wrote: > (trimming public list, since I don't want the justification here to ...
8 years, 9 months ago (2012-03-26 17:06:28 UTC) #9
jam
8 years, 9 months ago (2012-03-26 17:34:57 UTC) #10
On Mon, Mar 26, 2012 at 10:06 AM, Mark Mentovai <mark@chromium.org> wrote:

> John Abd-El-Malek wrote:
> > (trimming public list, since I don't want the justification here to be
> taken
> > out of context and misapplied in other cases)
>
> Really? Why? I think that this is important. Why do you want to hide
> it? If there’s missing context, provide it, but others can learn from
> this, too.
>

I think cases like this end up as a judgement call. From my experience with
these kind of threads, trying to come up with one rigid rule for it isn't
possible, and having everyone chip in and +1 with their preference isn't
productive.


> > when owners was first added, it was agreed that the owners system we were
> > starting with wouldn't work well with large refactorings. in google3,
> with
> > large refactorings like this the developers would be put in the top-level
> > owners file until they're done. since we had so many "set noparents" at
> that
> > time, it was agreed with ben/darin that we (content) would --force,
> while of
> > course using our judgment.
>
> And the specific issue I’ve raised is also about seeking the advice
> and review of platform experts, whether or not “set noparent” is
> present. The issue isn’t really about “noparent” especially now that
> it’s going away, it’s about discussing your change with the right
> people. base/mac did not have “noparent” at the time of your change
> and you did not seek review from any base/mac reviewer. base did and
> still does, and since the API you were cleaning up was a base API,
> “judgment” would seem to indicate that you ought to talk to someone
> competent in that directory. You were not changing base as a result of
> an API changing elsewhere in the codebase, you were changing a base
> API, and the effects were felt elsewhere in the codebase. --forcing
> past a “noparent” for purposes of cleanup was intended to ease the
> latter, not a way to evade review by the API owners.
>
> > regarding the scoped_nsautorelease_pool stuff, that is something I did as
> > part of the cleanup. From this email it's obvious that you disagree that
> the
> > change makes things better. I had talked to a number of people before
> doing
> > this (inc mac folks) in-person, and they were fine with it. IMO, the way
> > that we included a platform specific object in all platforms to reduce
> > ifdefs is something that we don't do anywhere else, and i wouldn't want
> this
> > pattern to spread. i.e. no where else does linux/win code include files
> from
> > base/mac, or vice versa for other combinations of platforms.
>
> “Talking to a number of people in-person” is just another way to hide.
> We’re a distributed team, and people outside of your own local office
> can and do have opinions, and might even be the right people to
> discuss your changes with. In-person back-room discussions are
> exclusionary and not auditable. The review process that we have exists
> for a reason. In fact, it exists for several reasons, and nobody is
> free to flout it for matters of convenience or expediency.
>
> Furthermore, I maintain that hiding “cleanup” inside a larger change
> is a bad practice, and it’s frowned upon at Google and by this team.
>

I don't agree that this is hiding a cleanup inside a larger change. (from
the cl desc) I had refactored the startup code so that now we have a struct
that had to have a windows specific struct (behind an ifdef). since the mac
specific member object was moving to that struct as well, i moved it to an
ifdef to match the windows one. Again, to make the usage of the mac class
match the usage of every other platform specific class that is only
included for that platform, in the process I updated the comment in base
and the othe one test/non-test cc files to add #ifdefs as well. As I said
earlier, I had run these by mac people. In retrospect I should have run it
by you since you're the only mac person in base/OWNERS. I guess I didn't
think this was worth a ping specifically to, but in the future I'll make
sure to ping you. As you've seen my other changes where I add you, I
usually add mac owners.


>
> > On Mon, Mar 26, 2012 at 9:23 AM, <mark@chromium.org> wrote:
> >>
> >> It looks like you masked unwanted “cleanup” in a larger change, and
> didn’t
> >> go
> >> through the proper review channels, like consulting an OWNER in a
> >> directory
> >> where there was no “set noparent.”
> >>
> >> You’ve made the point in the past that you (and others) would defer to
> >> appropriate platform reviewers as needed. Not only did you fail to do
> that
> >> here,
> >> you didn’t even seek any Mac developer’s input.
> >>
> >>
> >>
> >>
>
http://codereview.chromium.org/8414020/diff/5115/base/mac/scoped_nsautoreleas...
> >> File base/mac/scoped_nsautorelease_pool.h (left):
> >>
> >>
> >>
>
http://codereview.chromium.org/8414020/diff/5115/base/mac/scoped_nsautoreleas...
> >> base/mac/scoped_nsautorelease_pool.h:12: #if defined(OS_MACOSX)
> >> Why did you get rid of this?
> >>
> >> The intent was for this class to be usable without ugly #if guards on
> >> other platforms.
> >>
> >>
> >>
> http://codereview.chromium.org/8414020/diff/5115/base/message_pump_default.cc
> >> File base/message_pump_default.cc (right):
> >>
> >>
> >>
>
http://codereview.chromium.org/8414020/diff/5115/base/message_pump_default.cc...
> >> base/message_pump_default.cc:24: #if defined(OS_MACOSX)
> >> Like here, for example.
> >>
> >> http://codereview.chromium.org/8414020/
> >
> >
>

Powered by Google App Engine
This is Rietveld 408576698