blocked_interception_ui.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_BLOCKED_INTERCEPTION_UI_H_
  5. #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_BLOCKED_INTERCEPTION_UI_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "base/values.h"
  8. #include "components/security_interstitials/core/controller_client.h"
  9. #include "components/ssl_errors/error_classification.h"
  10. #include "net/ssl/ssl_info.h"
  11. #include "url/gurl.h"
  12. namespace security_interstitials {
  13. // Provides UI for SSL errors caused by blocked interceptions.
  14. class BlockedInterceptionUI {
  15. public:
  16. BlockedInterceptionUI(const GURL& request_url,
  17. int cert_error,
  18. const net::SSLInfo& ssl_info,
  19. ControllerClient* controller_);
  20. BlockedInterceptionUI(const BlockedInterceptionUI&) = delete;
  21. BlockedInterceptionUI& operator=(const BlockedInterceptionUI&) = delete;
  22. ~BlockedInterceptionUI();
  23. void PopulateStringsForHTML(base::Value::Dict& load_time_data);
  24. void HandleCommand(SecurityInterstitialCommand command);
  25. private:
  26. const GURL request_url_;
  27. const int cert_error_;
  28. const net::SSLInfo ssl_info_;
  29. raw_ptr<ControllerClient> controller_;
  30. bool user_made_decision_;
  31. };
  32. } // namespace security_interstitials
  33. #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_BLOCKED_INTERCEPTION_UI_H_