[go: nahoru, domu]

Rework GN sessions component

The main problem with the sessions build was that the test_support source set depended on the core source set, which had symbols set up to be exported. This caused duplicate symbols when both test_support and sessions_content were linked into the same target (like Chrome unit_tests does).

This removes the TODOs about the list of sources being duplicated. This actually confused me and set me back anbout an hour on this patch. The only thing is there are different targets for ios and non-iOS, and these files need to be shared. I don't think this is a problem or weird. The comment implied to me there were multiple static libraries in the same build sharing those sources, which is not the case.

I renamed the GN targets and did some cleanup to be consistent. There's no need for separate naming under iOS and non-iOS, for example.

Removes the SESSIONS_IMPLEMENTATION define for the test support target. This is not a component and should instead import those symbols from the component.

Implements a skeleton versions of sessions_ios.

The content/test change is unrelated but the bot threw an error (not sure why this doesn't always happen). But the gpu_blink dependency is definitely used, so adding it should be correct.

Adds a missing dependency on the win_window target. This is in the GYP build but missing in GN. I also renamed this target to use the typical naming convention while I was there.

This adds an export on the SessionsBackend class. This is depended on by the sessions test support target. I speculate the GYP build doesn't run into this because the sessions test support is a static library and the object file that references this symbol is actually unused, so it is stripped. In GN it's a source set so won't get this stripping.

CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg

Review URL: https://codereview.chromium.org/1114543005

Cr-Commit-Position: refs/heads/master@{#327778}
11 files changed