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

Issue 10383298: Move RegisterContentSchemes from public url_constants into non-public url_schemes. (Closed)

Created:
8 years, 7 months ago by grt (UTC plus 2)
Modified:
8 years, 6 months ago
Reviewers:
jam
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jochen+watch-content_chromium.org, rdsmith+dwatch_chromium.org, robertshield
Visibility:
Public.

Description

Move RegisterContentSchemes from public url_constants into non-public url_schemes. The VC++ linker can only discard whole .obj files that aren't used. setup.exe and npchrome_frame.dll pull in constants from url_constants.cc. http://crrev.com/133107 put RegisterContentSchemes into that file. This function's use of ContentClient causes all of WebKit and V8 to be pulled into setup.exe and npchrome_frame.dll. This change here moves RegisterContentSchemes into its own .cc file to get around link.exe's .obj-level code omission policy. This is a hack, and I feel shame for committing it. In the long run, we need a way to prevent changes that lead to a 6x increase in the size of the binaries spat out by the official builders. One could imagine this being done by a stage in a try run that goes red, or some build-time enforcement. Perhaps the constants should even go in their own target so that consumers of nothing but constants don't accidentally get content's transient dependencies. BUG=127564 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=139253

Patch Set 1 : #

Patch Set 2 : take RegisterContentSchemes out of public #

Total comments: 1

Patch Set 3 : pull common test initialization out into ContentTestSuiteBase #

Total comments: 11

Patch Set 4 : no more internal #

Patch Set 5 : GetSavableSchemesInternal #

Patch Set 6 : checkdeps! #

Total comments: 1

Patch Set 7 : no more Internal #

Patch Set 8 : export GetSavableSchemes #

Patch Set 9 : sigh #

Total comments: 2

Patch Set 10 : rebase to r139235 #

Patch Set 11 : GetSavableSchemesInternal again (Patch Set 5) #

Patch Set 12 : allow content/common/savable_url_schemes.h to be included by url_constants.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -123 lines) Patch
M chrome/test/base/chrome_test_suite.h View 1 2 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/base/chrome_test_suite.cc View 1 2 3 4 5 6 7 8 9 6 chunks +6 lines, -16 lines 0 comments Download
M content/app/content_main_runner.cc View 1 2 chunks +1 line, -1 line 0 comments Download
A content/common/savable_url_schemes.h View 1 2 3 4 6 7 8 9 10 1 chunk +20 lines, -0 lines 0 comments Download
A content/common/savable_url_schemes.cc View 1 2 3 4 6 7 8 9 10 1 chunk +39 lines, -0 lines 0 comments Download
A content/common/url_schemes.h View 1 1 chunk +27 lines, -0 lines 0 comments Download
A content/common/url_schemes.cc View 1 2 3 4 6 7 8 9 10 1 chunk +79 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/DEPS View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/url_constants.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -13 lines 0 comments Download
M content/public/common/url_constants.cc View 1 2 3 4 6 7 8 9 10 2 chunks +3 lines, -68 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/test/content_test_suite.h View 1 2 4 chunks +8 lines, -2 lines 0 comments Download
M content/test/content_test_suite.cc View 1 2 4 chunks +9 lines, -18 lines 0 comments Download
A content/test/content_test_suite_base.h View 1 2 1 chunk +35 lines, -0 lines 0 comments Download
A content/test/content_test_suite_base.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
M content/test/run_all_unittests.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
grt (UTC plus 2)
John: you have sufficient OWNERShip to take care of this in one fell swoop. Would ...
8 years, 7 months ago (2012-05-23 04:29:28 UTC) #1
jam
I have to agree that this is a hack :) I also agree we need ...
8 years, 7 months ago (2012-05-23 04:59:55 UTC) #2
grt (UTC plus 2)
Hi John, Thanks for the suggestions. I think I've taken care of the first part ...
8 years, 7 months ago (2012-05-24 04:08:51 UTC) #3
jam
On 2012/05/24 04:08:51, grt wrote: > Hi John, > > Thanks for the suggestions. I ...
8 years, 7 months ago (2012-05-24 05:13:47 UTC) #4
grt (UTC plus 2)
PTAL
8 years, 7 months ago (2012-05-24 16:02:17 UTC) #5
jam
thanks, almost there http://codereview.chromium.org/10383298/diff/19001/content/public/common/url_constants.h File content/public/common/url_constants.h (right): http://codereview.chromium.org/10383298/diff/19001/content/public/common/url_constants.h#newcode70 content/public/common/url_constants.h:70: CONTENT_EXPORT const char* const* GetSavableSchemes(); nit: ...
8 years, 7 months ago (2012-05-24 16:17:25 UTC) #6
grt (UTC plus 2)
Hi John, I think I'm approaching what you're looking for here. Let me know if ...
8 years, 7 months ago (2012-05-24 19:29:16 UTC) #7
jam
http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h File content/common/savable_url_schemes.h (right): http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h#newcode11 content/common/savable_url_schemes.h:11: namespace internal { nit: we don't use internal namespace ...
8 years, 7 months ago (2012-05-24 19:49:26 UTC) #8
jam
http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h File content/common/savable_url_schemes.h (right): http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h#newcode11 content/common/savable_url_schemes.h:11: namespace internal { On 2012/05/24 19:49:26, John Abd-El-Malek wrote: ...
8 years, 7 months ago (2012-05-24 19:57:14 UTC) #9
grt (UTC plus 2)
http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h File content/common/savable_url_schemes.h (right): http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h#newcode11 content/common/savable_url_schemes.h:11: namespace internal { On 2012/05/24 19:57:15, John Abd-El-Malek wrote: ...
8 years, 7 months ago (2012-05-24 20:33:14 UTC) #10
jam
lgtm without internal namespace http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h File content/common/savable_url_schemes.h (right): http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h#newcode11 content/common/savable_url_schemes.h:11: namespace internal { On 2012/05/24 ...
8 years, 7 months ago (2012-05-24 21:50:02 UTC) #11
grt (UTC plus 2)
http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h File content/common/savable_url_schemes.h (right): http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h#newcode11 content/common/savable_url_schemes.h:11: namespace internal { On 2012/05/24 21:50:02, John Abd-El-Malek wrote: ...
8 years, 7 months ago (2012-05-25 03:15:03 UTC) #12
jam
http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h File content/common/savable_url_schemes.h (right): http://codereview.chromium.org/10383298/diff/10002/content/common/savable_url_schemes.h#newcode11 content/common/savable_url_schemes.h:11: namespace internal { On 2012/05/25 03:15:04, grt wrote: > ...
8 years, 7 months ago (2012-05-25 08:12:04 UTC) #13
grt (UTC plus 2)
I think this may be it. Let me know.
8 years, 7 months ago (2012-05-25 14:09:55 UTC) #14
grt (UTC plus 2)
Perhaps the last one? http://codereview.chromium.org/10383298/diff/24005/content/public/common/url_constants.cc File content/public/common/url_constants.cc (right): http://codereview.chromium.org/10383298/diff/24005/content/public/common/url_constants.cc#newcode62 content/public/common/url_constants.cc:62: return GetSavableSchemesInternal(); since i had ...
8 years, 7 months ago (2012-05-25 16:48:13 UTC) #15
grt (UTC plus 2)
On 2012/05/25 16:48:13, grt wrote: > Perhaps the last one? Try runs are green at ...
8 years, 7 months ago (2012-05-25 21:02:17 UTC) #16
jam
http://codereview.chromium.org/10383298/diff/12023/content/public/common/savable_url_schemes.h File content/public/common/savable_url_schemes.h (right): http://codereview.chromium.org/10383298/diff/12023/content/public/common/savable_url_schemes.h#newcode18 content/public/common/savable_url_schemes.h:18: void SetSavableSchemes(const char* const* savable_schemes); we only put stuff ...
8 years, 7 months ago (2012-05-28 07:05:03 UTC) #17
grt (UTC plus 2)
http://codereview.chromium.org/10383298/diff/12023/content/public/common/savable_url_schemes.h File content/public/common/savable_url_schemes.h (right): http://codereview.chromium.org/10383298/diff/12023/content/public/common/savable_url_schemes.h#newcode18 content/public/common/savable_url_schemes.h:18: void SetSavableSchemes(const char* const* savable_schemes); On 2012/05/28 07:05:03, John ...
8 years, 6 months ago (2012-05-28 14:52:23 UTC) #18
jam
lgtm
8 years, 6 months ago (2012-05-28 17:15:29 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/grt@chromium.org/10383298/29002
8 years, 6 months ago (2012-05-28 17:16:50 UTC) #20
commit-bot: I haz the power
8 years, 6 months ago (2012-05-28 18:36:54 UTC) #21
Change committed as 139253

Powered by Google App Engine
This is Rietveld 408576698