OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_CHILD_SITE_ISOLATION_STATS_GATHERER_H_ | 5 #ifndef CONTENT_CHILD_SITE_ISOLATION_STATS_GATHERER_H_ |
6 #define CONTENT_CHILD_SITE_ISOLATION_STATS_GATHERER_H_ | 6 #define CONTENT_CHILD_SITE_ISOLATION_STATS_GATHERER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // "X-Content-Type-Options: nosniff" header, and with non-renderable status | 47 // "X-Content-Type-Options: nosniff" header, and with non-renderable status |
48 // code out of SiteIsolation.XSD.[%MIMETYPE].Blocked. | 48 // code out of SiteIsolation.XSD.[%MIMETYPE].Blocked. |
49 // SiteIsolation.XSD.[%MIMETYPE].NotBlocked : | 49 // SiteIsolation.XSD.[%MIMETYPE].NotBlocked : |
50 // # of responses, but not blocked due to failure of mime sniffing. | 50 // # of responses, but not blocked due to failure of mime sniffing. |
51 // SiteIsolation.XSD.[%MIMETYPE].NotBlocked.MaybeJS : | 51 // SiteIsolation.XSD.[%MIMETYPE].NotBlocked.MaybeJS : |
52 // # of responses that are plausibly sniffed to be JavaScript. | 52 // # of responses that are plausibly sniffed to be JavaScript. |
53 | 53 |
54 struct SiteIsolationResponseMetaData { | 54 struct SiteIsolationResponseMetaData { |
55 SiteIsolationResponseMetaData(); | 55 SiteIsolationResponseMetaData(); |
56 | 56 |
57 std::string frame_origin; | |
58 GURL response_url; | 57 GURL response_url; |
59 ResourceType resource_type; | 58 ResourceType resource_type; |
60 CrossSiteDocumentMimeType canonical_mime_type; | 59 CrossSiteDocumentMimeType canonical_mime_type; |
61 int http_status_code; | 60 int http_status_code; |
62 bool no_sniff; | 61 bool no_sniff; |
63 }; | 62 }; |
64 | 63 |
65 class CONTENT_EXPORT SiteIsolationStatsGatherer { | 64 class CONTENT_EXPORT SiteIsolationStatsGatherer { |
66 public: | 65 public: |
67 // Set activation flag for the UMA data collection for this renderer process. | 66 // Set activation flag for the UMA data collection for this renderer process. |
(...skipping 25 matching lines...) Expand all Loading... |
93 | 92 |
94 // Imprecise JS sniffing; only appropriate for collecting UMA stat. | 93 // Imprecise JS sniffing; only appropriate for collecting UMA stat. |
95 static bool SniffForJS(base::StringPiece data); | 94 static bool SniffForJS(base::StringPiece data); |
96 | 95 |
97 DISALLOW_COPY_AND_ASSIGN(SiteIsolationStatsGatherer); | 96 DISALLOW_COPY_AND_ASSIGN(SiteIsolationStatsGatherer); |
98 }; | 97 }; |
99 | 98 |
100 } // namespace content | 99 } // namespace content |
101 | 100 |
102 #endif // CONTENT_CHILD_SITE_ISOLATION_STATS_GATHERER_H_ | 101 #endif // CONTENT_CHILD_SITE_ISOLATION_STATS_GATHERER_H_ |
OLD | NEW |