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

Issue 8589001: Load mac sandbox definitions from resources instead of the bundle. (Closed)

Created:
9 years, 1 month ago by jochen (gone - plz use gerrit)
Modified:
9 years ago
CC:
chromium-reviews, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Load mac sandbox definitions from resources instead of the bundle. Also, move all mac sandbox unittests to content BUG=90443 TEST=content_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111614

Patch Set 1 #

Patch Set 2 : also remove old bundle gyp code #

Total comments: 4

Patch Set 3 : different approach #

Total comments: 26

Patch Set 4 : updates #

Patch Set 5 : rebase #

Total comments: 4

Patch Set 6 : updates #

Total comments: 4

Patch Set 7 : updates #

Total comments: 30

Patch Set 8 : updates #

Total comments: 22

Patch Set 9 : updates #

Total comments: 14

Patch Set 10 : updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -225 lines) Patch
M chrome/app/chrome_main_delegate.cc View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/browser_resources.grd View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
D chrome/browser/nacl_loader.sb View 1 2 1 chunk +0 lines, -14 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/common/chrome_content_client.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/chrome_content_client.cc View 1 2 3 4 5 6 7 8 3 chunks +16 lines, -0 lines 0 comments Download
A chrome/common/chrome_sandbox_type_mac.h View 1 2 3 4 5 6 7 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/common/common_resources.grd View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
A + chrome/common/nacl_loader.sb View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/nacl/nacl_main_platform_delegate_mac.mm View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M content/DEPS View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M content/app/content_main.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A + content/common/sandbox_init_mac.h View 1 2 1 chunk +5 lines, -19 lines 0 comments Download
M content/common/sandbox_init_mac.cc View 1 2 3 4 5 6 7 8 9 2 chunks +37 lines, -24 lines 0 comments Download
M content/common/sandbox_mac.h View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -32 lines 0 comments Download
M content/common/sandbox_mac.mm View 1 2 3 4 5 6 7 8 9 5 chunks +70 lines, -65 lines 0 comments Download
M content/common/sandbox_mac_fontloading_unittest.mm View 1 2 7 1 chunk +1 line, -1 line 0 comments Download
M content/common/sandbox_mac_unittest_helper.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -3 lines 0 comments Download
M content/common/sandbox_mac_unittest_helper.mm View 1 2 3 4 5 6 7 4 chunks +9 lines, -6 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -6 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -7 lines 0 comments Download
M content/content_ppapi_plugin.gypi View 1 1 chunk +0 lines, -9 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -5 lines 0 comments Download
M content/content_resources.grd View 1 2 3 4 5 6 7 1 chunk +6 lines, -6 lines 0 comments Download
M content/content_resources.gyp View 1 chunk +8 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M content/content_utility.gypi View 1 1 chunk +0 lines, -9 lines 0 comments Download
M content/ppapi_plugin/ppapi_thread.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/content_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
M content/public/common/sandbox_init.h View 1 2 3 4 5 6 7 8 9 2 chunks +19 lines, -2 lines 0 comments Download
A content/public/common/sandbox_type_mac.h View 1 2 3 4 5 6 7 8 1 chunk +40 lines, -0 lines 0 comments Download
M content/renderer/renderer_main_platform_delegate_mac.mm View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/shell/shell_content_client.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M content/shell/shell_content_client.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M content/test/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/test/test_content_client.h View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -0 lines 0 comments Download
M content/test/test_content_client.cc View 1 2 3 4 5 6 7 8 3 chunks +19 lines, -1 line 0 comments Download

Messages

Total messages: 27 (0 generated)
jochen (gone - plz use gerrit)
plz review avi, mac bits joi, grd bits john, content/ approval
9 years, 1 month ago (2011-11-16 22:00:53 UTC) #1
Avi (use Gerrit)
Looks plausible, but the Mac sandbox master is Jeremy.
9 years, 1 month ago (2011-11-16 22:02:59 UTC) #2
jam
content lgtm http://codereview.chromium.org/8589001/diff/4001/content/common/sandbox_mac.mm File content/common/sandbox_mac.mm (right): http://codereview.chromium.org/8589001/diff/4001/content/common/sandbox_mac.mm#newcode33 content/common/sandbox_mac.mm:33: #include "grit/content_resources.h" initially when separating content from ...
9 years, 1 month ago (2011-11-17 01:50:46 UTC) #3
jeremy
High level comments: 1)It's really important that we don't lose coverage on the Sandbox tests ...
9 years, 1 month ago (2011-11-17 13:34:14 UTC) #4
jeremy
http://codereview.chromium.org/8589001/diff/4001/content/common/sandbox_init_mac.cc File content/common/sandbox_init_mac.cc (right): http://codereview.chromium.org/8589001/diff/4001/content/common/sandbox_init_mac.cc#newcode16 content/common/sandbox_init_mac.cc:16: bool InitializeSandbox(int sandbox_definition_resource_id) { I would refactor this into ...
9 years, 1 month ago (2011-11-17 13:36:11 UTC) #5
Jói
Overall looks good, but it sounds like Jeremy should have the last word here. I'll ...
9 years, 1 month ago (2011-11-17 13:50:21 UTC) #6
jochen (gone - plz use gerrit)
On 2011/11/17 13:34:14, jeremy wrote: > High level comments: > 1)It's really important that we ...
9 years, 1 month ago (2011-11-19 12:24:04 UTC) #7
jochen (gone - plz use gerrit)
On 2011/11/17 01:50:46, John Abd-El-Malek wrote: > content lgtm > > http://codereview.chromium.org/8589001/diff/4001/content/common/sandbox_mac.mm > File content/common/sandbox_mac.mm ...
9 years, 1 month ago (2011-11-19 13:40:13 UTC) #8
jam
On 2011/11/19 12:24:04, jochen wrote: > On 2011/11/17 13:34:14, jeremy wrote: > > High level ...
9 years, 1 month ago (2011-11-21 17:11:54 UTC) #9
jochen (gone - plz use gerrit)
Ok, so what about the following structure in content/public.. RegisterSandboxPolicy(int sandbox_type, int sandbox_policy_resource_id); InitializeSandbox(int sandbox_type, ...
9 years, 1 month ago (2011-11-22 18:13:16 UTC) #10
jochen (gone - plz use gerrit)
PTAL I've tried another approach that maintains the separation between process type and policy
9 years, 1 month ago (2011-11-23 00:53:26 UTC) #11
jeremy
In general this approach seems OK to me, although we need to figure out a ...
9 years, 1 month ago (2011-11-23 07:02:16 UTC) #12
jochen (gone - plz use gerrit)
http://codereview.chromium.org/8589001/diff/11001/chrome/app/chrome_main_delegate.cc File chrome/app/chrome_main_delegate.cc (right): http://codereview.chromium.org/8589001/diff/11001/chrome/app/chrome_main_delegate.cc#newcode285 chrome/app/chrome_main_delegate.cc:285: // Mac needs them to for scrollbar related images ...
9 years, 1 month ago (2011-11-23 10:57:27 UTC) #13
Jói
LGTM with a couple of nits http://codereview.chromium.org/8589001/diff/19044/content/public/common/sandbox_process_type_mac.h File content/public/common/sandbox_process_type_mac.h (right): http://codereview.chromium.org/8589001/diff/19044/content/public/common/sandbox_process_type_mac.h#newcode36 content/public/common/sandbox_process_type_mac.h:36: SANDBOX_AFTER_TYPE_LAST_TYPE, // Placeholder ...
9 years, 1 month ago (2011-11-23 12:16:36 UTC) #14
jochen (gone - plz use gerrit)
http://codereview.chromium.org/8589001/diff/19044/content/public/common/sandbox_process_type_mac.h File content/public/common/sandbox_process_type_mac.h (right): http://codereview.chromium.org/8589001/diff/19044/content/public/common/sandbox_process_type_mac.h#newcode36 content/public/common/sandbox_process_type_mac.h:36: SANDBOX_AFTER_TYPE_LAST_TYPE, // Placeholder to ease iteration. What about SANDBOX_TYPE_AFTER_LAST_TYPE? ...
9 years, 1 month ago (2011-11-23 19:24:23 UTC) #15
Jói
LGTM On Wed, Nov 23, 2011 at 7:24 PM, <jochen@chromium.org> wrote: > > http://codereview.chromium.org/8589001/diff/19044/content/public/common/sandbox_process_type_mac.h > ...
9 years, 1 month ago (2011-11-23 19:56:36 UTC) #16
Jói
LGTM On Wed, Nov 23, 2011 at 7:24 PM, <jochen@chromium.org> wrote: > > http://codereview.chromium.org/8589001/diff/19044/content/public/common/sandbox_process_type_mac.h > ...
9 years, 1 month ago (2011-11-23 19:56:36 UTC) #17
jam
lgtm with nits great cleanup! http://codereview.chromium.org/8589001/diff/21001/content/DEPS File content/DEPS (right): http://codereview.chromium.org/8589001/diff/21001/content/DEPS#newcode62 content/DEPS:62: "-grit", can we just ...
9 years, 1 month ago (2011-11-23 20:29:17 UTC) #18
jochen (gone - plz use gerrit)
http://codereview.chromium.org/8589001/diff/21001/content/DEPS File content/DEPS (right): http://codereview.chromium.org/8589001/diff/21001/content/DEPS#newcode62 content/DEPS:62: "-grit", On 2011/11/23 20:29:17, John Abd-El-Malek wrote: > can ...
9 years, 1 month ago (2011-11-23 21:51:00 UTC) #19
jeremy
Code looks good, mostly naming issues and sprucing up comments. Since all the sandbox functions ...
9 years, 1 month ago (2011-11-24 12:20:19 UTC) #20
jochen (gone - plz use gerrit)
tl;dr all comments addressed http://codereview.chromium.org/8589001/diff/21002/chrome/common/chrome_content_client.cc File chrome/common/chrome_content_client.cc (right): http://codereview.chromium.org/8589001/diff/21002/chrome/common/chrome_content_client.cc#newcode410 chrome/common/chrome_content_client.cc:410: int ChromeContentClient::GetSandboxPolicyForSandboxType( On 2011/11/24 12:20:19, ...
9 years, 1 month ago (2011-11-24 16:23:21 UTC) #21
jeremy
Looks very good, a few minor comments - hopefully this will be the last round ...
9 years, 1 month ago (2011-11-24 16:42:04 UTC) #22
jochen (gone - plz use gerrit)
http://codereview.chromium.org/8589001/diff/24003/chrome/common/chrome_content_client.h File chrome/common/chrome_content_client.h (right): http://codereview.chromium.org/8589001/diff/24003/chrome/common/chrome_content_client.h#newcode38 chrome/common/chrome_content_client.h:38: virtual int GetSandboxProfileForSandboxType(int sandbox_type) const OVERRIDE; On 2011/11/24 16:42:04, ...
9 years, 1 month ago (2011-11-24 20:08:35 UTC) #23
jeremy
LGTM with comments addressed. http://codereview.chromium.org/8589001/diff/25017/content/common/sandbox_init_mac.cc File content/common/sandbox_init_mac.cc (left): http://codereview.chromium.org/8589001/diff/25017/content/common/sandbox_init_mac.cc#oldcode2 content/common/sandbox_init_mac.cc:2: // Use of this source ...
9 years ago (2011-11-25 19:53:16 UTC) #24
jochen (gone - plz use gerrit)
http://codereview.chromium.org/8589001/diff/25017/content/common/sandbox_init_mac.cc File content/common/sandbox_init_mac.cc (left): http://codereview.chromium.org/8589001/diff/25017/content/common/sandbox_init_mac.cc#oldcode2 content/common/sandbox_init_mac.cc:2: // Use of this source code is governed by ...
9 years ago (2011-11-25 20:30:16 UTC) #25
brettw
content/ppapi LGTM
9 years ago (2011-11-25 20:54:32 UTC) #26
jbates
9 years ago (2011-11-29 01:25:34 UTC) #27
Looks like this CL broke the GPU process on OSX. Any GL content now fails with:

FATAL:resource_bundle.cc(132)] Check failed: g_shared_instance_ != NULL.

Powered by Google App Engine
This is Rietveld 408576698