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

Unified Diff: chrome/browser/safe_browsing/browser_feature_extractor.cc

Issue 8400050: Include the HTTP status code as a feature in the ClientPhishingRequest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/browser_feature_extractor.cc
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc
index 7663551e203ac55b0cff8b0b35394373b5973c2a..1b11a7f4948a05a3200a3f1e96b274e7bfeb344c 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc
@@ -28,7 +28,7 @@
namespace safe_browsing {
-BrowseInfo::BrowseInfo() {}
+BrowseInfo::BrowseInfo() : http_status_code(0) {}
BrowseInfo::~BrowseInfo() {}
@@ -232,7 +232,9 @@ void BrowserFeatureExtractor::ExtractBrowseInfoFeatures(
static_cast<double>(info.unsafe_resource->threat_type),
request);
}
-
+ if (info.http_status_code != 0) {
+ AddFeature(features::kHttpStatusCode, info.http_status_code, request);
+ }
}
void BrowserFeatureExtractor::StartExtractFeatures(

Powered by Google App Engine
This is Rietveld 408576698