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

Unified Diff: android_webview/browser/aw_safe_browsing_blocking_page.cc

Issue 2898593002: WebView: choose loud vs. quiet interstitial (Closed)
Patch Set: Rebase and fix patch conflict Created 3 years, 7 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: android_webview/browser/aw_safe_browsing_blocking_page.cc
diff --git a/android_webview/browser/aw_safe_browsing_blocking_page.cc b/android_webview/browser/aw_safe_browsing_blocking_page.cc
index e625d9ce041fe9064f40596b76f08473d795350d..6ab83f564c82799e76919ab23fbc9db43efbf6ef 100644
--- a/android_webview/browser/aw_safe_browsing_blocking_page.cc
+++ b/android_webview/browser/aw_safe_browsing_blocking_page.cc
@@ -25,13 +25,15 @@ AwSafeBrowsingBlockingPage::AwSafeBrowsingBlockingPage(
const GURL& main_frame_url,
const UnsafeResourceList& unsafe_resources,
std::unique_ptr<SecurityInterstitialControllerClient> controller_client,
- const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options)
+ const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions& display_options,
+ ErrorUiType errorType)
: BaseBlockingPage(ui_manager,
web_contents,
main_frame_url,
unsafe_resources,
std::move(controller_client),
- display_options) {}
+ display_options,
+ errorType) {}
// static
void AwSafeBrowsingBlockingPage::ShowBlockingPage(
@@ -62,11 +64,21 @@ void AwSafeBrowsingBlockingPage::ShowBlockingPage(
false, // kSafeBrowsingProceedAnywayDisabled
true, // is_resource_cancellable
"cpn_safe_browsing_wv"); // help_center_article_link
+
+ ErrorUiType errorType;
sgurun-gerrit only 2017/05/22 21:05:29 Have Java return the type rather than adding a new
Nate Fischer 2017/05/22 23:13:46 Acknowledged. I'll work on this in the next patchs
+ if (ui_manager->IsLoud(unsafe_resource)) {
+ errorType = ErrorUiType::LOUD;
+ } else if (ui_manager->IsGiant(unsafe_resource)) {
+ errorType = ErrorUiType::QUIET_GIANT;
+ } else {
+ errorType = ErrorUiType::QUIET_SMALL;
+ }
+
AwSafeBrowsingBlockingPage* blocking_page = new AwSafeBrowsingBlockingPage(
ui_manager, web_contents, entry ? entry->GetURL() : GURL(),
unsafe_resources,
CreateControllerClient(web_contents, unsafe_resources, ui_manager),
- display_options);
+ display_options, errorType);
blocking_page->Show();
}
}

Powered by Google App Engine
This is Rietveld 408576698