gclient: Stop using implicit git_cache_dir.

Start passing in the git cache directly explicitly, or else not using
git cache. Further, continue to use a made up directory in /tmp if
inside the chroot, since we don't map the git cache directory into the
dchroot (this mostly only applies to unittests, I think).

Also, update all of the call chains to pass along the git cache
directory, which is being explicitly passed to cbuildbot on the
command line.

BUG=chromium:853391
TEST=run_tests

Change-Id: I96544e1b224bdd5c4a746ad02135db02fbdf461f
Reviewed-on: https://chromium-review.googlesource.com/1103551
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/sync_chrome.py b/scripts/sync_chrome.py
index 99cc760..b6e418a 100644
--- a/scripts/sync_chrome.py
+++ b/scripts/sync_chrome.py
@@ -34,8 +34,8 @@
   parser.add_argument('--gclient', help=commandline.argparse.SUPPRESS,
                       default=None)
   parser.add_argument('--gclient_template', help='Template gclient input file')
-  parser.add_argument('--skip_cache', help='Skip using git cache',
-                      dest='use_cache', action='store_false')
+  parser.add_argument('--git_cache_dir', help='Git cache directory to use.',
+                      type='path')
   parser.add_argument('--ignore_locks', help='Ignore git cache locks.',
                       action='store_true', default=False)
   parser.add_argument('chrome_root', help='Directory to sync chrome in')
@@ -47,7 +47,7 @@
   """Sync new Chrome."""
   gclient.WriteConfigFile(gclient_path, options.chrome_root,
                           options.internal, options.version,
-                          options.gclient_template, options.use_cache)
+                          options.gclient_template, options.git_cache_dir)
   gclient.Sync(gclient_path, options.chrome_root, reset=options.reset,
                ignore_locks=options.ignore_locks)