Add Gold git main method

Adds _GetGitOriginMainHeadSha1 to the Skia Gold code, which is identical
to the existing _GetGitOriginMasterHeadSha1 except in name. The former
will be switched to and the latter removed once all third party repos
are updated and Chromium can switch which version it uses.

Bug: chromium:1276531
Change-Id: I0a951bdeb1743eb5af5bc3e37f4dc092dc3abc1a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/87570
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/testing/tools/skia_gold/pdfium_skia_gold_properties.py b/testing/tools/skia_gold/pdfium_skia_gold_properties.py
index bf1e924..b15e140 100644
--- a/testing/tools/skia_gold/pdfium_skia_gold_properties.py
+++ b/testing/tools/skia_gold/pdfium_skia_gold_properties.py
@@ -22,6 +22,15 @@
     except subprocess.CalledProcessError:
       return None
 
+  @staticmethod
+  def _GetGitOriginMainHeadSha1():
+    try:
+      return subprocess.check_output(['git', 'rev-parse', 'origin/main'],
+                                     shell=_IsWin(),
+                                     cwd=path_util.GetPDFiumDir()).strip()
+    except subprocess.CalledProcessError:
+      return None
+
 
 def _IsWin():
   return sys.platform == 'win32'