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

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

Issue 2241673002: Make UnsafeResource hold a WebContents getter instead of RenderFrame ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « chrome/browser/safe_browsing/threat_details_unittest.cc ('k') | chrome/browser/safe_browsing/ui_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c94fc55109417f6c78f896e0ae1b7d071ba4ab06..7a9dac8ec128a3f958ca4a5b777b3d51a3e86e93 100644
--- a/chrome/browser/safe_browsing/ui_manager.h
+++ b/chrome/browser/safe_browsing/ui_manager.h
@@ -30,6 +30,7 @@ class Thread;
namespace content {
class NavigationEntry;
+class WebContents;
} // namespace content
namespace net {
@@ -74,6 +75,11 @@ class SafeBrowsingUIManager
// navigations), though a pending navigation is okay.
content::NavigationEntry* GetNavigationEntryForResource() const;
+ // Helper to build a getter for WebContents* from render frame id.
+ static base::Callback<content::WebContents*(void)> GetWebContentsGetter(
+ int render_process_host_id,
+ int render_frame_id);
+
GURL url;
GURL original_url;
std::vector<GURL> redirect_urls;
@@ -83,8 +89,7 @@ class SafeBrowsingUIManager
ThreatMetadata threat_metadata;
UrlCheckCallback callback; // This is called back on |callback_thread|.
scoped_refptr<base::SingleThreadTaskRunner> callback_thread;
- int render_process_host_id;
- int render_frame_id;
+ base::Callback<content::WebContents*(void)> web_contents_getter;
safe_browsing::ThreatSource threat_source;
};
« no previous file with comments | « chrome/browser/safe_browsing/threat_details_unittest.cc ('k') | chrome/browser/safe_browsing/ui_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698