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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java

Issue 2393813002: Polish Safe Browsing Subresource filter infobar. (Closed)
Patch Set: OK button Created 4 years, 2 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/android/java_sources.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java
new file mode 100644
index 0000000000000000000000000000000000000000..b14a0b7c45404bc5c90a01bd162df1d85ab94a7b
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/SubresourceFilterInfoBar.java
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.infobar;
+
+import org.chromium.base.annotations.CalledByNative;
+import org.chromium.chrome.browser.ResourceId;
+
+/**
+ * After user proceed through Safe Browsing warning interstitials that are displayed when the site
gone 2016/10/05 18:05:26 proceeds
melandory 2016/10/06 21:32:32 Done.
+ * ahead contains deceptive embedded content, the infobar appears, explains the feature and give
gone 2016/10/05 18:05:26 gives
melandory 2016/10/06 21:32:32 Done.
+ * the user an ability to reload the page with the content we've blocked previously.
+ */
+public class SubresourceFilterInfoBar extends ConfirmInfoBar {
+ private final String mExplanationMessage;
+
+ @CalledByNative
+ private static InfoBar show(int enumeratedIconId, String message, String primaryButtonText,
+ String secondaryButtonText, String explanationMessage) {
+ return new SubresourceFilterInfoBar(ResourceId.mapToDrawableId(enumeratedIconId), message,
+ primaryButtonText, secondaryButtonText, explanationMessage);
+ }
+
+ private SubresourceFilterInfoBar(int iconDrawbleId, String message, String primaryButtonText,
+ String secondaryButtonText, String explanationMessage) {
+ super(iconDrawbleId, null, message, null, primaryButtonText, secondaryButtonText);
+ mExplanationMessage = explanationMessage;
gone 2016/10/05 18:05:26 Can't you just grab the String resource from the j
+ }
+
+ @Override
+ public void createContent(InfoBarLayout layout) {
+ super.createContent(layout);
+ InfoBarControlLayout controlLayout = layout.addControlLayout();
+ controlLayout.addDescription(mExplanationMessage);
+ }
+}
« no previous file with comments | « no previous file | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698