Changes in HttpCredentialCleaner
This CL introduces a few improvements to HttpCredentialCleaner: (1) A fix in removing the protocol from signon_realm, (2) refactoring the unittest to use parameters, (3) minor style fixes. More details about (1): HttpCredentialCleaner removes the protocol (HTTP or HTTPS) form the signon_realm in order to compare the signon_realm of HTTP credentials with the signon_realm of HTTPS credentials. Until now, a GURL was created from the signon_realm of the form and then the protocol was extracted from that GURL, resulting the signon_realm excluding protocol. This can cause problems when the auth realm contains characters that are forbidden in an url. This will lead in creating an invalid url, and the resulting signon_realm with protocol exluded will be an empty string. This CL will avoid conversion from the signon_realm string to the GURL and use other way to remove the protocol from the signon_realm. More details about (2): Unitests for this class were changed from one single test into a bunch of parametrised tests in order to make debug easier in case of failing test in the future. Bug: 871140 Change-Id: Ic606d250f50806ae3a3fa07a480fcb01f5551c97 Reviewed-on: https://chromium-review.googlesource.com/1249104 Commit-Queue: Narcis Gemene <gemene@google.com> Reviewed-by:Vaclav Brozek <vabr@chromium.org> Cr-Commit-Position: refs/heads/master@{#594826}
Showing
This diff is collapsed.
Please register or sign in to comment