Modernising base::JsonReader to return base::expected

This CL adjusts JsonReader::ReadAndReturnValueWithError to
use base::expected, as it provides a more intuitive way to
communicate success/failure.

Bug: 1338575
Change-Id: I3dfa8248aad7c099133db6ee9e67b8063e7b78c1
Reviewed-by: Yann Dago <>
Reviewed-by: Eric Orth <>
Reviewed-by: Erik Chen <>
Reviewed-by: Ken Buchanan <>
Reviewed-by: Gabriel Charette <>
Reviewed-by: Maxim Kolosovskiy <>
Reviewed-by: Claudio M <>
Reviewed-by: Siddhartha S <>
Reviewed-by: Vasiliy Telezhnikov <>
Reviewed-by: Mark Cogan <>
Reviewed-by: Will Harris <>
Reviewed-by: Anqing Zhao <>
Reviewed-by: Alex Moshchuk <>
Reviewed-by: Robert Sesek <>
Commit-Queue: Claudio DeSouza <>
Reviewed-by: David Pennington <>
Reviewed-by: Justin Cohen <>
Reviewed-by: Mark Seaborn <>
Reviewed-by: Cici Ruan <>
Reviewed-by: Austin Sullivan <>
Reviewed-by: Luciano Pacheco <>
Reviewed-by: Luca Hunkeler <>
Reviewed-by: Dan H <>
Reviewed-by: Jimmy Gong <>
Reviewed-by: Devlin Cronin <>
Reviewed-by: Wez <>
Reviewed-by: Matt Reynolds <>
Reviewed-by: Ahmed Fakhry <>
Reviewed-by: Charlie Harrison <>
Reviewed-by: Dominick Ng <>
Reviewed-by: Daniel Rubery <>
Reviewed-by: John Chen <>
Reviewed-by: Toni Barzic <>
Reviewed-by: Daniel Cheng <>
Reviewed-by: Hirokazu Honda <>
Reviewed-by: Guido Urdaneta <>
Cr-Commit-Position: refs/heads/main@{#1017954}
GitOrigin-RevId: 8e71b8677f674bab739791d555b1bc32df30c392
1 file changed
tree: 44ddeb5eb4c2a0d392e0fd30d16ae624ba82556a
  1. linux/
  2. mac/
  3. policy/
  4. win/
  7. constants.h
  8. DEPS
  11. features.gni
  12. features.h
  13. ipc.dict
  14. OWNERS
  16. sandbox_export.h

Sandbox Library

This directory contains platform-specific sandboxing libraries. Sandboxing is a technique that can improve the security of an application by separating untrustworthy code (or code that handles untrustworthy data) and restricting its privileges and capabilities.

Each platform relies on the operating system's process primitive to isolate code into distinct security principals, and platform-specific technologies are used to implement the privilege reduction. At a high-level:

  • mac/ uses the Seatbelt sandbox. See the detailed design for more.
  • linux/ uses namespaces and Seccomp-BPF. See the detailed design for more.
  • win/ uses a combination of restricted tokens, distinct job objects, alternate desktops, and integrity levels. See the detailed design for more.

Built on top of the low-level sandboxing library is the //sandbox/policy component, which provides concrete policies and helper utilities for sandboxing specific Chromium processes and services. The core sandbox library cannot depend on the policy component.