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

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

Issue 1414343007: Collect threat details for phishing and UwS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 1 month 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 58f9451ea87ca66a91e4f6e5132f0f68c0b4705f..ef9f8b3e6e32626c8bfb8d6a2368112922fa0552 100644
--- a/chrome/browser/safe_browsing/threat_details.h
+++ b/chrome/browser/safe_browsing/threat_details.h
@@ -20,8 +20,8 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/safe_browsing/report.pb.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
+#include "chrome/common/safe_browsing/csd.pb.h"
#include "content/public/browser/web_contents_observer.h"
#include "net/base/completion_callback.h"
@@ -33,13 +33,13 @@ class ThreatDetailsCacheCollector;
class ThreatDetailsRedirectsCollector;
class ThreatDetailsFactory;
class Profile;
-struct SafeBrowsingHostMsg_MalwareDOMDetails_Node;
+struct SafeBrowsingHostMsg_ThreatDOMDetails_Node;
namespace safe_browsing {
// Maps a URL to its Resource.
typedef base::hash_map<
std::string,
- linked_ptr<safe_browsing::ClientMalwareReportRequest::Resource>>
+ linked_ptr<safe_browsing::ClientSafeBrowsingReportRequest::Resource>>
ResourceMap;
}
@@ -85,12 +85,12 @@ class ThreatDetails : public base::RefCountedThreadSafe<ThreatDetails>,
// Called on the IO thread with the DOM details.
virtual void AddDOMDetails(
- const std::vector<SafeBrowsingHostMsg_MalwareDOMDetails_Node>& params);
+ const std::vector<SafeBrowsingHostMsg_ThreatDOMDetails_Node>& params);
Profile* profile_;
// The report protocol buffer.
- scoped_ptr<safe_browsing::ClientMalwareReportRequest> report_;
+ scoped_ptr<safe_browsing::ClientSafeBrowsingReportRequest> report_;
// Used to get a pointer to the HTTP cache.
scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
@@ -107,8 +107,8 @@ class ThreatDetails : public base::RefCountedThreadSafe<ThreatDetails>,
// Finds an existing Resource for the given url, or creates a new
// one if not found, and adds it to |resources_|. Returns the
// found/created resource.
- safe_browsing::ClientMalwareReportRequest::Resource* FindOrCreateResource(
- const GURL& url);
+ safe_browsing::ClientSafeBrowsingReportRequest::Resource*
+ FindOrCreateResource(const GURL& url);
// Adds a Resource to resources_ with the given parent-child
// relationship. |parent| and |tagname| can be empty, |children| can be NULL.
@@ -119,7 +119,7 @@ class ThreatDetails : public base::RefCountedThreadSafe<ThreatDetails>,
// Message handler.
void OnReceivedThreatDOMDetails(
- const std::vector<SafeBrowsingHostMsg_MalwareDOMDetails_Node>& params);
+ const std::vector<SafeBrowsingHostMsg_ThreatDOMDetails_Node>& params);
void AddRedirectUrlList(const std::vector<GURL>& urls);
@@ -152,7 +152,7 @@ class ThreatDetails : public base::RefCountedThreadSafe<ThreatDetails>,
// Used to collect redirect urls from the history service
scoped_refptr<ThreatDetailsRedirectsCollector> redirects_collector_;
- FRIEND_TEST_ALL_PREFIXES(ThreatDetailsTest, MalwareDOMDetails);
+ FRIEND_TEST_ALL_PREFIXES(ThreatDetailsTest, ThreatDOMDetails);
FRIEND_TEST_ALL_PREFIXES(ThreatDetailsTest, HTTPCache);
FRIEND_TEST_ALL_PREFIXES(ThreatDetailsTest, HTTPCacheNoEntries);
FRIEND_TEST_ALL_PREFIXES(ThreatDetailsTest, HistoryServiceUrls);

Powered by Google App Engine
This is Rietveld 408576698