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

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

Issue 2275123004: Downgrade security state while displaying an SB interstitial (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dangerstate
Patch Set: Moar bugfix (thanks trybots!!) Created 4 years, 4 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: chrome/browser/safe_browsing/ui_manager.h
diff --git a/chrome/browser/safe_browsing/ui_manager.h b/chrome/browser/safe_browsing/ui_manager.h
index 82b2c63a0ed7cead36e26c248d0a9d9fccb8eb90..8cccdb1f6f90a069d2b29678e1361287fa3340da 100644
--- a/chrome/browser/safe_browsing/ui_manager.h
+++ b/chrome/browser/safe_browsing/ui_manager.h
@@ -125,15 +125,20 @@ class SafeBrowsingUIManager
// chain). Otherwise, |original_url| = |url|.
virtual void DisplayBlockingPage(const UnsafeResource& resource);
- // A wrapper method for IsUrlWhitelistedForWebContents, for convenience.
+ // A convenience wrapper method for IsUrlWhitelistedOrPendingForWebContents.
bool IsWhitelisted(const UnsafeResource& resource);
- // Returns true if we already displayed an interstitial for that top-level
- // site in a given WebContents. Called on the UI thread.
- bool IsUrlWhitelistedForWebContents(const GURL& url,
- bool is_subresource,
- content::NavigationEntry* entry,
- content::WebContents* web_contents);
+ // Checks if we already displayed an interstitial for that top-level
+ // site in a given WebContents. If |whitelist_only|, it returns true only if
+ // the user chose to ignore the interstitial; otherwise it returns true as
+ // long as the user has seen an interstitial (regardless of response).
+ // Called on the UI thread.
+ bool IsUrlWhitelistedOrPendingForWebContents(
+ const GURL& url,
+ bool is_subresource,
+ content::NavigationEntry* entry,
+ content::WebContents* web_contents,
+ bool whitelist_only);
// The blocking page on the UI thread has completed.
void OnBlockingPageDone(const std::vector<UnsafeResource>& resources,
@@ -189,8 +194,8 @@ class SafeBrowsingUIManager
void ReportPermissionActionOnIOThread(
const PermissionReportInfo& report_info);
- // Updates the whitelist state. Called on the UI thread.
- void AddToWhitelist(const UnsafeResource& resource);
+ // Updates the whitelist URL set. Called on the UI thread.
+ void AddToWhitelistUrlSet(const UnsafeResource& resource, bool is_pending);
// Safebrowsing service.
scoped_refptr<SafeBrowsingService> sb_service_;
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc ('k') | chrome/browser/safe_browsing/ui_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698