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

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

Issue 2540563002: Move SafeBrowsingUIManager::UnsafeResource to security_interstitials namespace (Closed)
Patch Set: rebase update Created 4 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
« 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 b8ad56dd199ac7416e33d9dcd2983f191386afc6..8c343798958275ab2671da48a9ecdae6764f3be1 100644
--- a/chrome/browser/safe_browsing/ui_manager.h
+++ b/chrome/browser/safe_browsing/ui_manager.h
@@ -19,6 +19,7 @@
#include "chrome/browser/permissions/permission_uma_util.h"
#include "components/safe_browsing_db/hit_report.h"
#include "components/safe_browsing_db/util.h"
+#include "components/security_interstitials/content/unsafe_resource.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/permission_type.h"
#include "url/gurl.h"
@@ -36,54 +37,7 @@ class SafeBrowsingService;
class SafeBrowsingUIManager
: public base::RefCountedThreadSafe<SafeBrowsingUIManager> {
public:
- // Passed a boolean indicating whether or not it is OK to proceed with
- // loading an URL.
- typedef base::Callback<void(bool /*proceed*/)> UrlCheckCallback;
-
- // Structure used to pass parameters between the IO and UI thread when
- // interacting with the blocking page.
- struct UnsafeResource {
- UnsafeResource();
- UnsafeResource(const UnsafeResource& other);
- ~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 only be called while the UnsafeResource is still
- // "valid".
- // I.e,
- // For MainPageLoadBlocked resources, it must not be called if the load
- // was aborted (going back or replaced with a different navigation),
- // or resumed (proceeded through warning or matched whitelist).
- // For non-MainPageLoadBlocked resources, it must not be called if any
- // other navigation has committed (whether by going back or unrelated
- // 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;
- bool is_subresource;
- bool is_subframe;
- SBThreatType threat_type;
- ThreatMetadata threat_metadata;
- UrlCheckCallback callback; // This is called back on |callback_thread|.
- scoped_refptr<base::SingleThreadTaskRunner> callback_thread;
- base::Callback<content::WebContents*(void)> web_contents_getter;
- safe_browsing::ThreatSource threat_source;
- };
-
+ typedef security_interstitials::UnsafeResource UnsafeResource;
// Observer class can be used to get notified when a SafeBrowsing hit
// was found.
class Observer {
« 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