Avoid an early start up crash in base::win::OSInfo.

r633961 tries to get the system architecture in Crashpad code. This gets
called very early during process start up and relies on
base::win::OSInfo. base::win::OSInfo gathers many different pieces of
information about the OS, but crashes as used from Crashpad, possibly
because of Windows registry access in a sandboxed process. Avoid this
issue by splitting base::win::OSInfo::architecture() out into a static
GetArchitecture() method. GetArchitecture() does the minimal amount of
work necessary to get the system architecture.

BUG=937840

Change-Id: I174ef78494dcf804f8f4bb1e3a7a25d9c0e37c9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1499730
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637432}
3 files changed