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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.h

Issue 2303413002: Simplify security_interstitials::ControllerClient and other related classes (Closed)
Patch Set: Rebase 2 Created 4 years, 3 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: chrome/browser/safe_browsing/safe_browsing_blocking_page.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
index 13779f1f9cd50aee49d4b94f034ff595f98cf946..0b2e2340428e8d35cca88bc1c01f37ac78470dc0 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
@@ -193,7 +193,8 @@ class SafeBrowsingBlockingPage : public SecurityInterstitialPage {
SB_REASON_MALWARE,
SB_REASON_HARMFUL,
SB_REASON_PHISHING,
- } interstitial_reason_;
+ };
+ SBInterstitialReason interstitial_reason_;
// The factory used to instantiate SafeBrowsingBlockingPage objects.
// Useful for tests, so they can provide their own implementation of
@@ -208,11 +209,22 @@ class SafeBrowsingBlockingPage : public SecurityInterstitialPage {
void PopulateHarmfulLoadTimeData(base::DictionaryValue* load_time_data);
void PopulatePhishingLoadTimeData(base::DictionaryValue* load_time_data);
- std::string GetMetricPrefix() const;
- std::string GetExtraMetricsSuffix() const;
- std::string GetRapporPrefix() const;
- std::string GetDeprecatedRapporPrefix() const;
- std::string GetSamplingEventName() const;
+ static std::string GetMetricPrefix(const UnsafeResourceList& unsafe_resources,
+ SBInterstitialReason interstitial_reason);
+ static std::string GetExtraMetricsSuffix(
+ const UnsafeResourceList& unsafe_resources);
+ static std::string GetRapporPrefix(SBInterstitialReason interstitial_reason);
+ static std::string GetDeprecatedRapporPrefix(
+ SBInterstitialReason interstitial_reason);
+ static std::string GetSamplingEventName(
+ SBInterstitialReason interstitial_reason);
+
+ static SBInterstitialReason GetInterstitialReason(
+ const UnsafeResourceList& unsafe_resources);
+
+ static std::unique_ptr<ChromeMetricsHelper> CreateMetricsHelper(
+ content::WebContents* web_contents,
+ const UnsafeResourceList& unsafe_resources);
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage);
};

Powered by Google App Engine
This is Rietveld 408576698