So, this one caused me some grief today.
I was editing the gypi file in chrome/chrome_browser.gypi to add another page load metrics observer. I added the following to the gypi:
'browser/page_load_metrics/observers/css_scanning_page_load_metrics_observer.cc'
'browser/page_load_metrics/observers/css_scanning_page_load_metrics_observer.h',
Note the missing comma. GN compiles this fine but can't link in the cc file so we get link errors.
There has to be a better way. What is going on behind the scenes here? My guess is that the two files are concatenated, in which case couldn't GN fail with an error about missing files?