There are two methods in two different private API extensions that are more or less identical. These are WebrtcLoggingPrivateFunction::RphFromRequest from which WebrtcAudioPrivateFunction::GetRenderProcessHostFromRequest was stolen (and slightly modified according to reviewer comments).
These two should be consolidated.
Also, the reviewer commented that "Using strings to compare origins is scary for lots of reasons. Can we instead use the url libraries?" This was related to
if (expected_origin.spec() != security_origin) {...}
Comment 1 by hlundin@chromium.org
, Apr 11 2017