Fix chrome_watcher logging size regression

Desktop / Chromium - Bruce Dawson [] - 13 July 2017 16:54 EDT

When added a call to InitChromeLogging() it had to pull in //chrome/common:common, and that necessarily pulls in several MB of code that is not wanted. The tendrils of dependencies are many and
varied and since a sword was disallowed there was no practical way to cut this Gordian knot. See the investigation in bug 717103 for details.

So, InitChromeLogging() was copied, named as InitChromeWatcherLogging(), and made to work. This gets the size-cost of the logging code down to ~25 KB.

A non_code_constants target was added to //chrome/common because the existing constants target was actually the main cause of excess code being pulled in.

While testing this change it was discovered that the command-line logging flags were not passed to the chrome_watcher process, so that logging was not actually being enabled. This was also fixed.

It may be possible to delete more of the copied code, depending on what logging features are actually needed. Thoughts?

Bug: 717103, 715060 Change-Id: I536b0813fff32e513dfd3e0bbb8fc3cb715546c1 Reviewed-on:

5c9466e Fix chrome_watcher logging size regression
chrome/app/ | 11 +-
chrome/chrome_watcher/ | 3 +-
chrome/chrome_watcher/ | 202 +++++++++++++++++++++++++-
chrome/common/ | 21 ++-
4 files changed, 228 insertions(+), 9 deletions(-)


  • Share