Name Date Size #Lines LOC

..--

DIR_METADATAH A D25-Apr-2025109 76

README.mdH A D25-Apr-20252 KiB3325

mock_persistent_nel_store.ccH A D25-Apr-20254.4 KiB135100

mock_persistent_nel_store.hH A D25-Apr-20254.4 KiB12660

mock_persistent_nel_store_unittest.ccH A D25-Apr-20259.7 KiB273208

network_error_logging_service.ccH A D25-Apr-202537.5 KiB1,049734

network_error_logging_service.hH A D25-Apr-202511 KiB334184

network_error_logging_service_unittest.ccH A D25-Apr-202575.7 KiB1,9101,443

network_error_logging_test_util.ccH A D25-Apr-20251.7 KiB5136

network_error_logging_test_util.hH A D25-Apr-20252.3 KiB7146

persistent_reporting_and_nel_store.hH A D25-Apr-2025749 2110

README.md

1# Network Error Logging (NEL)
2
3Network Error Logging (NEL) provides out-of-band reporting of network errors
4via the Reporting API (see `//net/reporting`). Site operators can specify a
5NEL policy that defines the Reporting endpoint(s) on which they wish to receive
6reports about client-side errors encountered while connecting to the site. The
7draft spec can be found [here](https://w3c.github.io/network-error-logging/).
8
9This directory contains the core implementation of NEL.
10
11## Implementation overview
12
13Most of the action takes place in
14[`NetworkErrorLoggingService`](https://source.chromium.org/chromium/chromium/src/+/main:net/network_error_logging/network_error_logging_service.h;l=42;drc=a9e9d6cbb3e5920f9207118cf9501ff0745bb536),
15which handles receiving/processing `NEL:` response headers and
16generating/queueing reports about network requests. The
17`NetworkErrorLoggingService` is owned by the `URLRequestContext`.
18
19Information about network requests comes directly from
20[`HttpNetworkTransaction`](https://source.chromium.org/chromium/chromium/src/+/main:net/http/http_network_transaction.cc;l=1364;drc=a9e9d6cbb3e5920f9207118cf9501ff0745bb536),
21which informs `NetworkErrorLoggingService` of the details of the request such
22as the remote IP address and outcome (a `net::Error` code).
23
24The `NetworkErrorLoggingService` finds a NEL policy applicable to the request
25(previously set by a `NEL` header), and if one exists, potentially queues a
26NEL report to be uploaded out-of-band to the policy's specified Reporting
27endpoint via the
28[`ReportingService`](https://source.chromium.org/chromium/chromium/src/+/main:net/reporting/reporting_service.h;l=56;drc=c3305c04ac6800d488bfc8b2f3249fd13186984a).
29
30Received NEL policies are persisted to disk by a `PersistentNelStore`, whose
31main implementation is the
32[`SqlitePersistentReportingAndNelStore`](https://source.chromium.org/chromium/chromium/src/+/main:net/extras/sqlite/sqlite_persistent_reporting_and_nel_store.h;l=30;drc=456596a0b27623349d38e49d0e9812b24d47d5d8).
33