• Colin Blundell's avatar
    WebLayer: Reuse SSLBlockingPage from //components · fbc20852
    Colin Blundell authored
    This CL ports WebLayer to share the //components-level SSLBlockingPage
    rather than having a custom fork.
    
    Changes to enable this:
    
    - The configuration done in //weblayer's SSLBlockingPage::Create() is
      moved to //weblayer's SSLErrorHandler::ShowSSLInterstitial()
    
    Differences between //weblayer's ssl_blocking_page.cc and the
    //components-level ssl_blocking_page.cc mainly relate to the latter's
    usage of CertReportHelper, which helps report invalid certificate
    chains:
    
    - The latter calls CertReportHelper::PopulateExtendedReportingOption()
      in its PopulateInterstitialStrings() method
    - The latter calls CertReportHelper::HandleReportingCommands()
      in its CommandReceived() method
    - The latter inherits SSLBlockingPageBase::OnInterstitialClosing(),
      which calls UpdateMetricsAfterSecurityInterstitial() and
      CertReportHelper::FinishCertCollection() [the //weblayer version's
      impl of OnInterstitialClosing() is empty]
    
    A final difference is that the latter inherits
    SSLBlockingPageBase::OverrideRendererPrefs(), which takes action if
    |renderer_pref_callback_| is non-null. In the //weblayer context
    |renderer_pref_callback_| *is* null as
    SSLBlockingPageBase::set_renderer_pref_callback() is never invoked,
    so this particular difference won't have any behavioral impact.
    
    Bug: 1025059
    Change-Id: I64795ed164cc9e3d778d5ef6d9d505badc9d741a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1924570
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Reviewed-by: default avatarEvan Stade <estade@chromium.org>
    Reviewed-by: default avatarCarlos IL <carlosil@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#719109}
    fbc20852
BUILD.gn 12.6 KB