Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / safe_browsing / browser_features.h
blob493c473d5b79abd7e4d3094d11da3f9852bed4a9
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Client-side phishing features that are extracted by the browser, after
6 // receiving a score from the renderer.
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_BROWSER_FEATURES_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_BROWSER_FEATURES_H_
11 namespace safe_browsing {
12 namespace features {
14 // IMPORTANT: when adding new features, you must update kAllowedFeatures in
15 // chrome/browser/safe_browsing/client_side_detection_service.cc if the feature
16 // should be sent in sanitized pingbacks.
18 ////////////////////////////////////////////////////
19 // History features.
20 ////////////////////////////////////////////////////
22 // Number of visits to that URL stored in the browser history.
23 // Should always be an integer larger than 1 because by the time
24 // we lookup the history the current URL should already be stored there.
25 extern const char kUrlHistoryVisitCount[];
27 // Number of times the URL was typed in the Omnibox.
28 extern const char kUrlHistoryTypedCount[];
30 // Number of times the URL was reached by clicking a link.
31 extern const char kUrlHistoryLinkCount[];
33 // Number of times URL was visited more than 24h ago.
34 extern const char kUrlHistoryVisitCountMoreThan24hAgo[];
36 // Number of user-visible visits to all URLs on the same host/port as
37 // the URL for HTTP and HTTPs.
38 extern const char kHttpHostVisitCount[];
39 extern const char kHttpsHostVisitCount[];
41 // Boolean feature which is true if the host was visited for the first
42 // time more than 24h ago (only considers user-visible visits like above).
43 extern const char kFirstHttpHostVisitMoreThan24hAgo[];
44 extern const char kFirstHttpsHostVisitMoreThan24hAgo[];
46 ////////////////////////////////////////////////////
47 // Browse features.
48 ////////////////////////////////////////////////////
49 // Note that these features may have the following prefixes appended to them
50 // that tell for which page type the feature pertains.
51 extern const char kHostPrefix[];
53 // Referrer
54 extern const char kReferrer[];
55 // True if the referrer was stripped because it is an SSL referrer.
56 extern const char kHasSSLReferrer[];
57 // Stores the page transition. See: PageTransition. We strip the qualifier.
58 extern const char kPageTransitionType[];
59 // True if this navigation is the first for this tab.
60 extern const char kIsFirstNavigation[];
61 // Feature that is set if the url from the navigation entry doesn't match the
62 // url at the end of the redirect chain.
63 extern const char kRedirectUrlMismatch[];
64 // The redirect chain that leads to the named page.
65 extern const char kRedirect[];
66 // If a redirect is SSL, we will use this value instead of the actual redirect
67 // so we don't leak any SSL sites.
68 extern const char kSecureRedirectValue[];
70 // The HTTP status code for the main document.
71 extern const char kHttpStatusCode[];
73 // SafeBrowsing related featues. Fields from the UnsafeResource if there is
74 // any.
75 extern const char kSafeBrowsingMaliciousUrl[];
76 extern const char kSafeBrowsingOriginalUrl[];
77 extern const char kSafeBrowsingIsSubresource[];
78 extern const char kSafeBrowsingThreatType[];
79 } // namespace features
80 } // namespace safe_browsing
82 #endif // CHROME_BROWSER_SAFE_BROWSING_BROWSER_FEATURES_H_