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

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

Issue 7189074: Send the referral URL with the client-side phishing detection request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Brian's comments. Created 9 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/browser_feature_extractor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/browser_feature_extractor.h
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.h b/chrome/browser/safe_browsing/browser_feature_extractor.h
index 802afb5f3cac55af17c6302261300bbb117092dd..042e379d084695d8fb0e14f0bff5e40ed1539ca2 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.h
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.h
@@ -21,6 +21,8 @@
#include "base/time.h"
#include "chrome/browser/history/history_types.h"
#include "content/browser/cancelable_request.h"
+#include "content/common/page_transition_types.h"
+#include "googleurl/src/gurl.h"
class HistoryService;
class TabContents;
@@ -28,6 +30,19 @@ class TabContents;
namespace safe_browsing {
class ClientPhishingRequest;
+struct BrowseInfo {
+ // The URL that is being classified. This is redundant information but
+ // we keep it around to verify that the URL that comes back from the
+ // renderer is unchanged.
+ GURL url;
+
+ // The referrer URL.
+ GURL referrer;
+
+ // How did we get to the URL?
+ PageTransition::Type transition;
+};
+
namespace features {
// TODO(noelutz): move renderer/safe_browsing/features.h to common.
@@ -58,6 +73,14 @@ extern const char kHttpsHostVisitCount[];
// time more than 24h ago (only considers user-visible visits like above).
extern const char kFirstHttpHostVisitMoreThan24hAgo[];
extern const char kFirstHttpsHostVisitMoreThan24hAgo[];
+
+////////////////////////////////////////////////////
+// Browse features.
+////////////////////////////////////////////////////
+// True if the referrer was stripped because it is an SSL referrer.
+extern const char kHasSSLReferrer[];
+// Stores the page transition. See: PageTransition. We strip the qualifier.
+extern const char kPageTransitionType[];
} // namespace features
// All methods of this class must be called on the UI thread (including
@@ -83,7 +106,8 @@ class BrowserFeatureExtractor {
// feature extraction is complete, |callback| is run on the UI thread. We
// take ownership of the |callback| object. This method must run on the UI
// thread.
- virtual void ExtractFeatures(ClientPhishingRequest* request,
+ virtual void ExtractFeatures(const BrowseInfo& info,
+ ClientPhishingRequest* request,
DoneCallback* callback);
private:
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/browser_feature_extractor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698