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

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

Issue 1509073002: Fixes for Safe Browsing with unrelated pending navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review changes for comment #10 Created 5 years 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 191dcccfb220252e42762914624028056567febc..d66a2fbab2c65a133263e5ca0c253072e8c76607 100644
--- a/chrome/browser/safe_browsing/ui_manager.h
+++ b/chrome/browser/safe_browsing/ui_manager.h
@@ -25,6 +25,10 @@ namespace base {
class Thread;
} // namespace base
+namespace content {
+class NavigationEntry;
+} // namespace content
+
namespace net {
class SSLInfo;
} // namespace net
@@ -47,8 +51,20 @@ class SafeBrowsingUIManager
UnsafeResource();
~UnsafeResource();
+ // Returns true if this UnsafeResource is a main frame load that was blocked
+ // while the navigation is still pending. Note that a main frame hit may not
+ // be blocking, eg. client side detection happens after the load is
+ // committed.
bool IsMainPageLoadBlocked() const;
+ // Returns the NavigationEntry for this resource (for a main frame hit) or
+ // for the page which contains this resource (for a subresource hit).
+ // This method must not be used if any navigations have occured since the
Charlie Reis 2015/12/17 19:24:18 nit: occurred
mattm 2015/12/18 21:41:04 Done.
+ // hit (eg, it should only be used while the interstitial is showing, or
Charlie Reis 2015/12/17 19:24:18 nit: Are there any other cases it could be used?
mattm 2015/12/18 21:41:04 Clarified.
+ // during the OnSafeBrowsingHit observer.)
+ // Return value may be NULL.
+ content::NavigationEntry* GetNavigationEntryForResource() const;
+
GURL url;
GURL original_url;
std::vector<GURL> redirect_urls;

Powered by Google App Engine
This is Rietveld 408576698