[iOS] Add a utility function for accessing user default strings

This CL standardizes fetching strings from user defaults. When
fetching a string, either it will be valid and non empty, or it
will be nil.

Bug: 380790152
Change-Id: I0236a6423979f7f25d02ecd813110058e51229ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6216359
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Tommy Martino <tmartino@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1416749}
NOKEYCHECK=True
GitOrigin-RevId: e33f3742d6769a4e4c4dbfab77f8cc39933209c3
7 files changed
tree: d058f7b31b52171b0516099d48329fad7ace7081
  1. build/
  2. chrome/
  3. components/
  4. google_internal/
  5. intents/
  6. net/
  7. public/
  8. testing/
  9. third_party/
  10. tools/
  11. web/
  12. web_view/
  13. .swift-format
  14. BUILD.gn
  15. COMMON_METADATA
  16. DEPS
  17. DIR_METADATA
  18. features.gni
  19. OWNERS
  20. PRESUBMIT.py
  21. PRESUBMIT_test.py
  22. README.md
README.md

This directory holds code related to Chrome for iOS. See this document for a description of the structure underneath this directory.