Chromium Code Reviews
DescriptionAbility to persist RTCCertificate in IndexedDB (enables cloning).
The WebRTC spec[1] mandates that RTCCertificates can be persisted to storage by
an application by implementing the structured clone algorithm. This allows it to
be saved and loaded from IndexedDB.
This is achieved with the following changes:
1. RTCCertificate to/from string
a) The ToPEM and FromPEM serialization functions from the WebRTC layer that
converts RTCCertificate to- and from string are made visible in the blink
and content layers.
b) |WebRTCCertificate::keyParams| is removed so that we don't have to
serialize this or add getters for obtaining this information from the
WebRTC layer's RTCCertificate. The getter was never used by anyone.
2. RTCCertificate serialization (structured clone algorithm)
a) ScriptValueSerializerForModules and friends are updated with write and
read functions for RTCCertificate (impl using 1.).
3. Unittests making sure RTCCertificate can be saved and loaded from IndexedDB
a) chrome/test/data/webrtc/indexeddb.js added with functions for managing
a database and saving and loading (cloning) certificates.
b) WebRtcTestBase implementing C++ functions for calling the indexeddb.js
API.
c) WebRtcBrowserTest tests added which clone certificates and sets up calls
using the clones.
[1] https://w3c.github.io/webrtc-pc/archives/20160125/webrtc.html#attributes-6
This CL is being split up into smaller CLs:
- Pt. 1: https://codereview.chromium.org/1957293002/
- Pt. 3a-b: https://codereview.chromium.org/1962673002/
- Pt. 2+3c: https://codereview.chromium.org/1959333002/
BUG=581354
Patch Set 1 : #Messages
Total messages: 9 (6 generated)
|