tree: 747c5636f51f26a29e36ae502386dc1e036a75f7 [search]
  1. android/
  2. core/
  3. test_support/
  4. AGENTS.md
  5. buildflags.gni
  6. COMMON_METADATA
  7. COMMON_METADATA.chromeos
  8. DEPS
  9. DIR_METADATA
  10. OWNERS
  11. README.md
  12. SECURITY.md
components/supervised_user/README.md

Supervised User Component

Supervised User is a multiprocess layered component that implements cross-platform parental controls, URL filtering, web approvals, supervision state management, and Kids Management API networking across Chrome (Desktop, Android, ChromeOS, iOS) and shared interstitial resources used by Android WebView.

This document describes how the main services fit together. For the map of the directories in this product area, see AGENTS.md. For the threat model, see SECURITY.md. Per-class rules live in the headers in core/browser/.

Directory Structure

  • core/common/: Feature flags, pref names, and constants shared by the browser and the renderer.
  • core/browser/: Keyed services, URL filtering, interstitials, approvals, and the Kids Management API fetchers.
  • core/browser/android/: Native side of Android device parental controls.
  • core/browser/proto/: Protos for the Kids Management API and Parent Access.
  • core/browser/resources/: Resources for the blocking interstitials, also used by Android WebView.
  • android/: Java side of Android device parental controls, and its Robolectric tests.
  • test_support/: Shared fakes and mocks for tests.

core/ must not depend on content/, chrome/, or ios/ (enforced by DEPS). Embedders and other directories of this product area are listed in AGENTS.md.

Architecture

  Family Link (Account-Scoped)                 Device Parental Controls (OS-Scoped)
  ────────────────────────────                 ────────────────────────────────────
  IdentityManager / AccountCapabilities        OS Content Filters (Android JNI / NoOp)
         │                                                    │
         ├────────────────────────┐                           ▼
         ▼                        ▼                    DeviceParentalControls (singleton)
  ChildAccountService     ListFamilyMembersService            │
    (updates supervision    (updates custodian                ├────────────────┐
     & SafeSearch prefs)     prefs via ProtoFetcher)          │                │
         │                                                    ▼                ▼
         ▼                                             SupervisedUser   DeviceParentalControls
  FamilyLinkSettingsService ─────────────────────────► PrefStore        UrlFilter (no OAuth)
    (Sync + local store)                               (merges FL +            │
         │                                              DPC into Prefs)        │
         ▼                                                                     │
  FamilyLinkUrlFilter ────────────────────────────────────────┬────────────────┘
                                                              ▼
  SupervisedUserService                          SupervisedUserUrlFilteringService
    (Custodians, Incognito,                        (Single facade; aggregates & routes
     RemoteWebApprovalsManager)                     results + InterstitialMode)
         │                                                    │
         └────────────────────────┬───────────────────────────┘
                                  ▼
                       SupervisedUserInterstitial
                         ├──► Remote approvals: RemoteWebApprovalsManager ──► ProtoFetcher
                         └──► Local approvals:  WebContentHandler (embedder UI/OS)
                                                    └──► FamilyLinkSettingsService

Supervision Sources

Two independent sources can supervise a profile:

  • Family Link (account-scoped): Comes from the signed-in Google account. ChildAccountService derives the supervision state from the account‘s capabilities. FamilyLinkSettingsService holds the parent’s settings, synced through Sync, and ListFamilyMembersService fetches the custodians. SupervisedUserService handles the rest of the account-scoped lifecycle, such as remote web approvals.
  • Device Parental Controls (device-scoped): DeviceParentalControls reports restrictions set in the operating system (currently on Android). It needs no Google account, Sync, or custodian, and all profiles share it.

Supervision reaches the rest of the browser through:

URL Filtering

SupervisedUserUrlFilteringService is the single entry point for URL filtering decisions. It asks one filter per source: DeviceParentalControlsUrlFilter checks URLs against Safe Sites without end-user credentials, and FamilyLinkUrlFilter applies the parent‘s allow and block lists, then Safe Sites. The service stops at the first filter that blocks, so that filter’s InterstitialMode reaches the caller.

Approvals

A blocked page shows a SupervisedUserInterstitial. Only Family Link blocks (InterstitialMode::kParentalReviewInterstitial) offer approvals, because only Family Link has a parent. Device Parental Controls blocks show a page with a “Learn more” link instead.

  • Remote approvals: RemoteWebApprovalsManager sends a request to the parent, whose decision arrives through Sync.
  • Local approvals: The embedder‘s WebContentHandler runs the platform’s in-person approval flow. Every implementation must end in WebContentHandler::OnLocalApprovalRequestCompleted().