File: browser_features.h

package info (click to toggle)
chromium-browser 57.0.2987.98-1~deb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 2,637,852 kB
  • ctags: 2,544,394
  • sloc: cpp: 12,815,961; ansic: 3,676,222; python: 1,147,112; asm: 526,608; java: 523,212; xml: 286,794; perl: 92,654; sh: 86,408; objc: 73,271; makefile: 27,698; cs: 18,487; yacc: 13,031; tcl: 12,957; pascal: 4,875; ml: 4,716; lex: 3,904; sql: 3,862; ruby: 1,982; lisp: 1,508; php: 1,368; exp: 404; awk: 325; csh: 117; jsp: 39; sed: 37
file content (82 lines) | stat: -rw-r--r-- 3,304 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Client-side phishing features that are extracted by the browser, after
// receiving a score from the renderer.

#ifndef CHROME_BROWSER_SAFE_BROWSING_BROWSER_FEATURES_H_
#define CHROME_BROWSER_SAFE_BROWSING_BROWSER_FEATURES_H_

namespace safe_browsing {
namespace features {

// IMPORTANT: when adding new features, you must update kAllowedFeatures in
// chrome/browser/safe_browsing/client_side_detection_service.cc if the feature
// should be sent in sanitized pingbacks.
//
////////////////////////////////////////////////////
// History features.
////////////////////////////////////////////////////

// Number of visits to that URL stored in the browser history.
// Should always be an integer larger than 1 because by the time
// we lookup the history the current URL should already be stored there.
extern const char kUrlHistoryVisitCount[];

// Number of times the URL was typed in the Omnibox.
extern const char kUrlHistoryTypedCount[];

// Number of times the URL was reached by clicking a link.
extern const char kUrlHistoryLinkCount[];

// Number of times URL was visited more than 24h ago.
extern const char kUrlHistoryVisitCountMoreThan24hAgo[];

// Number of user-visible visits to all URLs on the same host/port as
// the URL for HTTP and HTTPs.
extern const char kHttpHostVisitCount[];
extern const char kHttpsHostVisitCount[];

// Boolean feature which is true if the host was visited for the first
// time more than 24h ago (only considers user-visible visits like above).
extern const char kFirstHttpHostVisitMoreThan24hAgo[];
extern const char kFirstHttpsHostVisitMoreThan24hAgo[];

////////////////////////////////////////////////////
// Browse features.
////////////////////////////////////////////////////
// Note that these features may have the following prefixes appended to them
// that tell for which page type the feature pertains.
extern const char kHostPrefix[];

// Referrer
extern const char kReferrer[];
// 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[];
// True if this navigation is the first for this tab.
extern const char kIsFirstNavigation[];
// Feature that is set if the url from the navigation entry doesn't match the
// url at the end of the redirect chain.
extern const char kRedirectUrlMismatch[];
// The redirect chain that leads to the named page.
extern const char kRedirect[];
// If a redirect is SSL, we will use this value instead of the actual redirect
// so we don't leak any SSL sites.
extern const char kSecureRedirectValue[];

// The HTTP status code for the main document.
extern const char kHttpStatusCode[];

// SafeBrowsing related featues.  Fields from the UnsafeResource if there is
// any.
extern const char kSafeBrowsingMaliciousUrl[];
extern const char kSafeBrowsingOriginalUrl[];
extern const char kSafeBrowsingIsSubresource[];
extern const char kSafeBrowsingThreatType[];
}  // namespace features
}  // namespace safe_browsing

#endif  // CHROME_BROWSER_SAFE_BROWSING_BROWSER_FEATURES_H_