Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: components/security_interstitials/core/base_safe_browsing_error_ui.h

Issue 2852333003: Rename SafeBrowsingErrorUI to SafeBrowsingLoudErrorUI (Closed)
Patch Set: Move SafeBrowsingErrorUI to SafeBrowsingLoudErrorUI Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/security_interstitials/core/base_safe_browsing_error_ui.h
diff --git a/components/security_interstitials/core/safe_browsing_error_ui.h b/components/security_interstitials/core/base_safe_browsing_error_ui.h
similarity index 64%
rename from components/security_interstitials/core/safe_browsing_error_ui.h
rename to components/security_interstitials/core/base_safe_browsing_error_ui.h
index ed1a90584f41faff4c6226811fbe119ca2a4018a..c813acb70eca838ea759379f2c4b3655fcf07b2b 100644
--- a/components/security_interstitials/core/safe_browsing_error_ui.h
+++ b/components/security_interstitials/core/base_safe_browsing_error_ui.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_SAFE_BROWSING_ERROR_UI_H_
-#define COMPONENTS_SECURITY_INTERSTITIALS_CORE_SAFE_BROWSING_ERROR_UI_H_
+#ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_BASE_SAFE_BROWSING_ERROR_UI_H_
+#define COMPONENTS_SECURITY_INTERSTITIALS_CORE_BASE_SAFE_BROWSING_ERROR_UI_H_
#include "base/macros.h"
#include "base/time/time.h"
@@ -16,7 +16,7 @@ namespace security_interstitials {
// This class displays UI for Safe Browsing errors that block page loads. This
// class is purely about visual display; it does not do any error-handling logic
// to determine what type of error should be displayed when.
-class SafeBrowsingErrorUI {
+class BaseSafeBrowsingErrorUI {
public:
enum SBInterstitialReason {
SB_REASON_MALWARE,
@@ -64,22 +64,10 @@ class SafeBrowsingErrorUI {
bool is_resource_cancellable;
};
- SafeBrowsingErrorUI(const GURL& request_url,
- const GURL& main_frame_url,
- SBInterstitialReason reason,
- const SBErrorDisplayOptions& display_options,
- const std::string& app_locale,
- const base::Time& time_triggered,
- ControllerClient* controller);
- ~SafeBrowsingErrorUI();
-
- void PopulateStringsForHTML(base::DictionaryValue* load_time_data);
- void HandleCommand(SecurityInterstitialCommands command);
-
- // Checks if we should even show the extended reporting option. We don't show
- // it in incognito mode or if kSafeBrowsingExtendedReportingOptInAllowed
- // preference is disabled.
- bool CanShowExtendedReportingOption();
+ BaseSafeBrowsingErrorUI(SBInterstitialReason reason,
+ const SBErrorDisplayOptions& display_options,
+ const std::string& app_locale);
+ ~BaseSafeBrowsingErrorUI();
bool is_main_frame_load_blocked() const {
return display_options_.is_main_frame_load_blocked;
@@ -89,9 +77,7 @@ class SafeBrowsingErrorUI {
return display_options_.is_extended_reporting_opt_in_allowed;
}
- bool is_off_the_record() const {
- return display_options_.is_off_the_record;
- }
+ bool is_off_the_record() const { return display_options_.is_off_the_record; }
bool is_extended_reporting_enabled() const {
return display_options_.is_extended_reporting_enabled;
@@ -101,30 +87,18 @@ class SafeBrowsingErrorUI {
return display_options_.is_proceed_anyway_disabled;
}
- const std::string app_locale() const {
- return app_locale_;
- }
+ const std::string app_locale() const { return app_locale_; }
private:
- // Fills the passed dictionary with the values to be passed to the template
- // when creating the HTML.
- void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data);
- void PopulateMalwareLoadTimeData(base::DictionaryValue* load_time_data);
- void PopulateHarmfulLoadTimeData(base::DictionaryValue* load_time_data);
- void PopulatePhishingLoadTimeData(base::DictionaryValue* load_time_data);
-
const GURL request_url_;
const GURL main_frame_url_;
const SBInterstitialReason interstitial_reason_;
SBErrorDisplayOptions display_options_;
const std::string app_locale_;
- const base::Time time_triggered_;
-
- ControllerClient* controller_;
- DISALLOW_COPY_AND_ASSIGN(SafeBrowsingErrorUI);
+ DISALLOW_COPY_AND_ASSIGN(BaseSafeBrowsingErrorUI);
};
} // security_interstitials
-#endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_SAFE_BROWSING_ERROR_UI_H_
+#endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_BASE_SAFE_BROWSING_ERROR_UI_H_

Powered by Google App Engine
This is Rietveld 408576698