Consolidate GPU pre-sandbox hooks.

Avoid having three very-similar functions.
Add some missing consts along the way.

Change-Id: I203e874cc20a2056bf74005cbc7f4a625c1094fe
Reviewed-on: https://chromium-review.googlesource.com/757767
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514907}
3 files changed