Ensure low-memory renderers retry failed loads correctly.

LibraryLoader uses isUsingBrowserSharedRelros() to decide whether to retry
a fixed address load for the browser. On a low-memory target, this function
will currently return true for both browser and renderer processes. This
means that any renderer fixed load retry for low-memory will also occur in
LibraryLoader, rather than in ChildProcessService.

This works, but a side effect is that UMA statistics for failed renderer
fixed address load are not updated correctly by ChildProcessService (such
an event will however not register as a failed browser load either,
because the function to push UMA values on browser load is not called for
a child process).

Fixed by making isUsingBrowserSharedRelros() return false if not in the
browser process, regardless of any low-memory/normal-memory setting.

Additionally, make ...ForTesting functions final, and clean up a few
portions of testing code for tighter operation.

BUG=460499

Review URL: https://codereview.chromium.org/1349673003

Cr-Commit-Position: refs/heads/master@{#349420}


CrOS-Libchrome-Original-Commit: 1f11873066a51ebe84e302128957ddc5ee594065
2 files changed
tree: a60d9d64c2c5917c37c9b531d7eb0f89437c3661
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/