Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
DIR_METADATA | H A D | 25-Apr-2025 | 109 | 7 | 6 | |
README.md | H A D | 25-Apr-2025 | 2 KiB | 33 | 25 | |
mock_persistent_nel_store.cc | H A D | 25-Apr-2025 | 4.4 KiB | 135 | 100 | |
mock_persistent_nel_store.h | H A D | 25-Apr-2025 | 4.4 KiB | 126 | 60 | |
mock_persistent_nel_store_unittest.cc | H A D | 25-Apr-2025 | 9.7 KiB | 273 | 208 | |
network_error_logging_service.cc | H A D | 25-Apr-2025 | 37.5 KiB | 1,049 | 734 | |
network_error_logging_service.h | H A D | 25-Apr-2025 | 11 KiB | 334 | 184 | |
network_error_logging_service_unittest.cc | H A D | 25-Apr-2025 | 75.7 KiB | 1,910 | 1,443 | |
network_error_logging_test_util.cc | H A D | 25-Apr-2025 | 1.7 KiB | 51 | 36 | |
network_error_logging_test_util.h | H A D | 25-Apr-2025 | 2.3 KiB | 71 | 46 | |
persistent_reporting_and_nel_store.h | H A D | 25-Apr-2025 | 749 | 21 | 10 |
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