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

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

Issue 2784253004: Componentize safe_browsing: decouple threat_details* from the chrome/ layer. (Closed)
Patch Set: fix compile for browser tests Created 3 years, 8 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/threat_details.h
diff --git a/chrome/browser/safe_browsing/threat_details.h b/chrome/browser/safe_browsing/threat_details.h
index e5f6ac564a0e2bb60d20678f3a32f35427808deb..19a8c31ab2da9740087a752099e6b92ff97ee454 100644
--- a/chrome/browser/safe_browsing/threat_details.h
+++ b/chrome/browser/safe_browsing/threat_details.h
@@ -20,7 +20,7 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/safe_browsing/ui_manager.h"
+#include "components/safe_browsing/base_ui_manager.h"
Jialiu Lin 2017/04/07 18:42:05 nit: Maybe use a forward declaration here. and put
timvolodine 2017/04/10 15:02:55 yes indeed. done. (still required unsafe_resource.
#include "components/safe_browsing/common/safebrowsing_types.h"
#include "components/safe_browsing/csd.pb.h"
#include "content/public/browser/browser_thread.h"
@@ -31,7 +31,6 @@ namespace net {
class URLRequestContextGetter;
}
-class Profile;
struct SafeBrowsingHostMsg_ThreatDOMDetails_Node;
namespace safe_browsing {
@@ -72,9 +71,12 @@ class ThreatDetails : public base::RefCountedThreadSafe<
typedef security_interstitials::UnsafeResource UnsafeResource;
// Constructs a new ThreatDetails instance, using the factory.
- static ThreatDetails* NewThreatDetails(BaseUIManager* ui_manager,
- content::WebContents* web_contents,
- const UnsafeResource& resource);
+ static ThreatDetails* NewThreatDetails(
+ BaseUIManager* ui_manager,
+ content::WebContents* web_contents,
+ const UnsafeResource& resource,
+ net::URLRequestContextGetter* request_context_getter,
+ history::HistoryService* history_service);
// Makes the passed |factory| the factory used to instanciate
// SafeBrowsingBlockingPage objects. Useful for tests.
@@ -104,7 +106,9 @@ class ThreatDetails : public base::RefCountedThreadSafe<
ThreatDetails(BaseUIManager* ui_manager,
content::WebContents* web_contents,
- const UnsafeResource& resource);
+ const UnsafeResource& resource,
+ net::URLRequestContextGetter* request_context_getter,
+ history::HistoryService* history_service);
~ThreatDetails() override;
@@ -114,8 +118,6 @@ class ThreatDetails : public base::RefCountedThreadSafe<
const GURL& frame_last_committed_url,
const std::vector<SafeBrowsingHostMsg_ThreatDOMDetails_Node>& params);
- Profile* profile_;
-
// The report protocol buffer.
std::unique_ptr<ClientSafeBrowsingReportRequest> report_;
@@ -244,7 +246,9 @@ class ThreatDetailsFactory {
virtual ThreatDetails* CreateThreatDetails(
BaseUIManager* ui_manager,
content::WebContents* web_contents,
- const SafeBrowsingUIManager::UnsafeResource& unsafe_resource) = 0;
+ const security_interstitials::UnsafeResource& unsafe_resource,
+ net::URLRequestContextGetter* request_context_getter,
+ history::HistoryService* history_service) = 0;
};
} // namespace safe_browsing
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc ('k') | chrome/browser/safe_browsing/threat_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698