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

Unified Diff: android_webview/browser/aw_safe_browsing_ui_manager.cc

Issue 2898593002: WebView: choose loud vs. quiet interstitial (Closed)
Patch Set: Rebase, fix merge conflicts 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_ui_manager.cc
diff --git a/android_webview/browser/aw_safe_browsing_ui_manager.cc b/android_webview/browser/aw_safe_browsing_ui_manager.cc
index 3a5043d10f82449a58fa37d483aedfda664df46c..562a9066411455d666cb9b9f2047c657528b31b5 100644
--- a/android_webview/browser/aw_safe_browsing_ui_manager.cc
+++ b/android_webview/browser/aw_safe_browsing_ui_manager.cc
@@ -25,7 +25,7 @@ void AwSafeBrowsingUIManager::DisplayBlockingPage(
WebContents* web_contents = resource.web_contents_getter.Run();
// Check the size of the view
UIManagerClient* client = UIManagerClient::FromWebContents(web_contents);
- if (!client || !client->CanShowBigInterstitial()) {
+ if (!client || !client->CanShowInterstitial()) {
LOG(WARNING) << "The view is not suitable to show the SB interstitial";
OnBlockingPageDone(std::vector<UnsafeResource>{resource}, false,
web_contents, resource.url.GetWithEmptyPath());
@@ -39,4 +39,11 @@ void AwSafeBrowsingUIManager::ShowBlockingPageForResource(
AwSafeBrowsingBlockingPage::ShowBlockingPage(this, resource);
}
+int AwSafeBrowsingUIManager::GetErrorUiType(
+ const UnsafeResource& resource) const {
+ WebContents* web_contents = resource.web_contents_getter.Run();
+ UIManagerClient* client = UIManagerClient::FromWebContents(web_contents);
+ return client && client->GetErrorUiType();
+}
+
} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698