cros_chrome_make: Use CHROME_ORIGIN env variable

Previously cros_chrome_make would assume it was using GERRIT_SOURCE
if and only if a developer had cros_workon'd chromeos-chrome. This
resulted in a cros_workon'd LOCAL_SOURCE having the wrong runhooks
checks run.

Fixed to use CHROME_ORIGIN if set, and otherwise fall back to the
previous behavior. Always sets CHROME_ORIGIN on the ebuild command,
so similar bugs in the future should be more obvious.

BUG=chromium-os:25439
TEST=cros_chrome_make with LOCAL_ and GERRIT_SOURCE, and either
  stable and 9999 ebuilds. Runhooks is not unnecessarily repeated.

Change-Id: I7e951860ed97ba2fb408edc863941f52368cb0eb
Reviewed-on: https://gerrit.chromium.org/gerrit/14743
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Chris Wolfe <cwolfe@chromium.org>
Tested-by: Chris Wolfe <cwolfe@chromium.org>
1 file changed