summaryrefslogtreecommitdiff
path: root/chromium/chrome/common/ssl_insecure_content.h
blob: 45ce1597d0352f272c29e972af7af8c125a33eda (plain)
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
// Copyright 2016 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.

#ifndef CHROME_COMMON_SSL_INSECURE_CONTENT_H_
#define CHROME_COMMON_SSL_INSECURE_CONTENT_H_

class GURL;

// Insecure content types used in the SSL.InsecureContent histogram.
// This enum is histogrammed, so do not add, reorder, or remove values.
enum class SslInsecureContentType {
  DISPLAY = 0,
  DISPLAY_HOST_GOOGLE,      // deprecated
  DISPLAY_HOST_WWW_GOOGLE,  // deprecated
  DISPLAY_HTML,
  RUN,
  RUN_HOST_GOOGLE,      // deprecated
  RUN_HOST_WWW_GOOGLE,  // deprecated
  RUN_TARGET_YOUTUBE,   // deprecated
  RUN_JS,
  RUN_CSS,
  RUN_SWF,
  DISPLAY_HOST_YOUTUBE,           // deprecated
  RUN_HOST_YOUTUBE,               // deprecated
  RUN_HOST_GOOGLEUSERCONTENT,     // deprecated
  DISPLAY_HOST_MAIL_GOOGLE,       // deprecated
  RUN_HOST_MAIL_GOOGLE,           // deprecated
  DISPLAY_HOST_PLUS_GOOGLE,       // deprecated
  RUN_HOST_PLUS_GOOGLE,           // deprecated
  DISPLAY_HOST_DOCS_GOOGLE,       // deprecated
  RUN_HOST_DOCS_GOOGLE,           // deprecated
  DISPLAY_HOST_SITES_GOOGLE,      // deprecated
  RUN_HOST_SITES_GOOGLE,          // deprecated
  DISPLAY_HOST_PICASAWEB_GOOGLE,  // deprecated
  RUN_HOST_PICASAWEB_GOOGLE,      // deprecated
  DISPLAY_HOST_GOOGLE_READER,     // deprecated
  RUN_HOST_GOOGLE_READER,         // deprecated
  DISPLAY_HOST_CODE_GOOGLE,       // deprecated
  RUN_HOST_CODE_GOOGLE,           // deprecated
  DISPLAY_HOST_GROUPS_GOOGLE,     // deprecated
  RUN_HOST_GROUPS_GOOGLE,         // deprecated
  DISPLAY_HOST_MAPS_GOOGLE,       // deprecated
  RUN_HOST_MAPS_GOOGLE,           // deprecated
  DISPLAY_HOST_GOOGLE_SUPPORT,    // deprecated
  RUN_HOST_GOOGLE_SUPPORT,        // deprecated
  DISPLAY_HOST_GOOGLE_INTL,       // deprecated
  RUN_HOST_GOOGLE_INTL,           // deprecated
  NUM_EVENTS
};

// Reports insecure content to the SSL.InsecureContent histogram using the
// provided |signal|.
void ReportInsecureContent(SslInsecureContentType signal);

// Reports insecure content displayed or ran if |resource_URL| matches specific
// file types.
void FilteredReportInsecureContentDisplayed(const GURL& resource_gurl);
void FilteredReportInsecureContentRan(const GURL& resource_gurl);

#endif  // CHROME_COMMON_SSL_INSECURE_CONTENT_H_