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

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

Issue 2700323002: Refactor BaseBlockingPage to reduce duplicated code (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 759f622d16215a92d6931cf44e03dc17f131e5fc..fe0f322882ea74820dd8c4f50f9e8f54acc114e5 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h
@@ -34,9 +34,8 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/task/cancelable_task_tracker.h"
-#include "chrome/browser/safe_browsing/ui_manager.h"
#include "components/safe_browsing/base_blocking_page.h"
+#include "components/safe_browsing/base_ui_manager.h"
namespace safe_browsing {
@@ -73,7 +72,6 @@ class SafeBrowsingBlockingPage : public BaseBlockingPage {
}
// InterstitialPageDelegate method:
- void OnProceed() override;
void OverrideRendererPrefs(content::RendererPreferences* prefs) override;
content::InterstitialPageDelegate::TypeID GetTypeForTesting() const override;
@@ -108,11 +106,9 @@ class SafeBrowsingBlockingPage : public BaseBlockingPage {
const UnsafeResourceList& unsafe_resources,
const SafeBrowsingErrorUI::SBErrorDisplayOptions& display_options);
- // After a safe browsing interstitial where the user opted-in to the
- // report but clicked "proceed anyway", we delay the call to
- // ThreatDetails::FinishCollection() by this much time (in
- // milliseconds), in order to get data from the blocked resource itself.
- int64_t threat_details_proceed_delay_ms_;
+ // Called after the user clicks OnProceed(). If the page has malicious
+ // subresources, then we show another interstitial.
+ void HandleSubresourcesAfterProceed() override;
// Called when the interstitial is going away. If there is a
// pending threat details object, we look at the user's
@@ -131,7 +127,6 @@ class SafeBrowsingBlockingPage : public BaseBlockingPage {
// Useful for tests, so they can provide their own implementation of
// SafeBrowsingBlockingPage.
static SafeBrowsingBlockingPageFactory* factory_;
-
private:
static std::string GetSamplingEventName(
SafeBrowsingErrorUI::SBInterstitialReason interstitial_reason);
@@ -139,7 +134,8 @@ class SafeBrowsingBlockingPage : public BaseBlockingPage {
static std::unique_ptr<
security_interstitials::SecurityInterstitialControllerClient>
CreateControllerClient(content::WebContents* web_contents,
- const UnsafeResourceList& unsafe_resources);
+ const UnsafeResourceList& unsafe_resources,
+ const BaseUIManager* ui_manager);
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage);
};
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698