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

Unified Diff: chrome/browser/renderer_host/safe_browsing_resource_throttle.h

Issue 586793003: Safebrowsing: Honor the metadata from malware fullhash results in SB API 3.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes for sky Created 6 years, 3 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/renderer_host/safe_browsing_resource_throttle.h
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle.h b/chrome/browser/renderer_host/safe_browsing_resource_throttle.h
index 5246f9998e588fd513b6d51dada74e564a30decb..eba1618efcb71e7d0b0e139b157d2a52ba893857 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_throttle.h
+++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle.h
@@ -14,6 +14,7 @@
#include "chrome/browser/safe_browsing/database_manager.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
#include "content/public/browser/resource_throttle.h"
+#include "content/public/common/resource_type.h"
class ResourceDispatcherHost;
@@ -49,7 +50,7 @@ class SafeBrowsingResourceThrottle
public base::SupportsWeakPtr<SafeBrowsingResourceThrottle> {
public:
SafeBrowsingResourceThrottle(const net::URLRequest* request,
- bool is_subresource,
+ content::ResourceType resource_type,
SafeBrowsingService* safe_browsing);
// content::ResourceThrottle implementation (called on IO thread):
@@ -58,8 +59,9 @@ class SafeBrowsingResourceThrottle
virtual const char* GetNameForLogging() const OVERRIDE;
// SafeBrowsingDabaseManager::Client implementation (called on IO thread):
- virtual void OnCheckBrowseUrlResult(
- const GURL& url, SBThreatType result) OVERRIDE;
+ virtual void OnCheckBrowseUrlResult(const GURL& url,
+ SBThreatType result,
+ const std::string& metadata) OVERRIDE;
private:
// Describes what phase of the check a throttle is in.
@@ -126,7 +128,8 @@ class SafeBrowsingResourceThrottle
scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
scoped_refptr<SafeBrowsingUIManager> ui_manager_;
const net::URLRequest* request_;
- bool is_subresource_;
+ const bool is_subresource_;
+ const bool is_subframe_;
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle);
};

Powered by Google App Engine
This is Rietveld 408576698