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

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

Issue 368143002: Add a chrome://interstitials page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android build Created 6 years, 5 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 | « chrome/browser/safe_browsing/safe_browsing_blocking_page.h ('k') | chrome/browser/ssl/ssl_blocking_page.h » ('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.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 81c3f2a116fdd9cee692ebffd320a0c4f6fadf70..b644b70602b2eec1a66db3ae1dd88731f36fa010 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -311,7 +311,7 @@ SafeBrowsingBlockingPage::SafeBrowsingBlockingPage(
}
interstitial_page_ = InterstitialPage::Create(
- web_contents, IsMainPageLoadBlocked(unsafe_resources), url_, this);
+ web_contents, is_main_frame_load_blocked_, url_, this);
}
bool SafeBrowsingBlockingPage::CanShowMalwareDetailsOption() {
@@ -872,6 +872,20 @@ SafeBrowsingBlockingPage::UnsafeResourceMap*
}
// static
+SafeBrowsingBlockingPage* SafeBrowsingBlockingPage::CreateBlockingPage(
+ SafeBrowsingUIManager* ui_manager,
+ WebContents* web_contents,
+ const UnsafeResource& unsafe_resource) {
+ std::vector<UnsafeResource> resources;
+ resources.push_back(unsafe_resource);
+ // Set up the factory if this has not been done already (tests do that
+ // before this method is called).
+ if (!factory_)
+ factory_ = g_safe_browsing_blocking_page_factory_impl.Pointer();
+ return factory_->CreateSafeBrowsingPage(ui_manager, web_contents, resources);
+}
+
+// static
void SafeBrowsingBlockingPage::ShowBlockingPage(
SafeBrowsingUIManager* ui_manager,
const UnsafeResource& unsafe_resource) {
@@ -892,14 +906,8 @@ void SafeBrowsingBlockingPage::ShowBlockingPage(
if (!interstitial) {
// There are no interstitial currently showing in that tab, go ahead and
// show this interstitial.
- std::vector<UnsafeResource> resources;
- resources.push_back(unsafe_resource);
- // Set up the factory if this has not been done already (tests do that
- // before this method is called).
- if (!factory_)
- factory_ = g_safe_browsing_blocking_page_factory_impl.Pointer();
SafeBrowsingBlockingPage* blocking_page =
- factory_->CreateSafeBrowsingPage(ui_manager, web_contents, resources);
+ CreateBlockingPage(ui_manager, web_contents, unsafe_resource);
blocking_page->interstitial_page_->Show();
return;
}
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.h ('k') | chrome/browser/ssl/ssl_blocking_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698