OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // ThreatDOMDetails iterates over a document's frames and gathers | 5 // ThreatDOMDetails iterates over a document's frames and gathers |
6 // interesting URLs such as those of scripts and frames. When done, it sends | 6 // interesting URLs such as those of scripts and frames. When done, it sends |
7 // them to the ThreatDetails that requested them. | 7 // them to the ThreatDetails that requested them. |
8 | 8 |
9 #ifndef COMPONENTS_SAFE_BROWSING_RENDERER_THREAT_DOM_DETAILS_H_ | 9 #ifndef COMPONENTS_SAFE_BROWSING_RENDERER_THREAT_DOM_DETAILS_H_ |
10 #define COMPONENTS_SAFE_BROWSING_RENDERER_THREAT_DOM_DETAILS_H_ | 10 #define COMPONENTS_SAFE_BROWSING_RENDERER_THREAT_DOM_DETAILS_H_ |
11 | 11 |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/feature_list.h" | 15 #include "base/feature_list.h" |
16 #include "content/public/renderer/render_frame_observer.h" | 16 #include "content/public/renderer/render_frame_observer.h" |
17 | 17 |
18 struct SafeBrowsingHostMsg_ThreatDOMDetails_Node; | 18 struct SafeBrowsingHostMsg_ThreatDOMDetails_Node; |
19 | 19 |
20 namespace safe_browsing { | 20 namespace safe_browsing { |
21 | 21 |
| 22 extern const base::Feature kThreatDomDetailsTagAndAttributeFeature; |
22 extern const char kTagAndAttributeParamName[]; | 23 extern const char kTagAndAttributeParamName[]; |
23 | 24 |
24 // Represents the tag name of an HTML Element and its associated attributes. | 25 // Represents the tag name of an HTML Element and its associated attributes. |
25 // Used to determine which elements to collect. Populated from the param value | 26 // Used to determine which elements to collect. Populated from the param value |
26 // of |kThreatDomDetailsTagAndAttributeFeature|. | 27 // of |kThreatDomDetailsTagAndAttributeFeature|. |
27 class TagAndAttributesItem { | 28 class TagAndAttributesItem { |
28 public: | 29 public: |
29 TagAndAttributesItem(); | 30 TagAndAttributesItem(); |
30 TagAndAttributesItem(const TagAndAttributesItem& item); | 31 TagAndAttributesItem(const TagAndAttributesItem& item); |
31 ~TagAndAttributesItem(); | 32 ~TagAndAttributesItem(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // A list of tag names and associates attributes, used to determine which | 72 // A list of tag names and associates attributes, used to determine which |
72 // elements need to be collected. | 73 // elements need to be collected. |
73 std::vector<TagAndAttributesItem> tag_and_attributes_list_; | 74 std::vector<TagAndAttributesItem> tag_and_attributes_list_; |
74 | 75 |
75 DISALLOW_COPY_AND_ASSIGN(ThreatDOMDetails); | 76 DISALLOW_COPY_AND_ASSIGN(ThreatDOMDetails); |
76 }; | 77 }; |
77 | 78 |
78 } // namespace safe_browsing | 79 } // namespace safe_browsing |
79 | 80 |
80 #endif // COMPONENTS_SAFE_BROWSING_RENDERER_THREAT_DOM_DETAILS_H_ | 81 #endif // COMPONENTS_SAFE_BROWSING_RENDERER_THREAT_DOM_DETAILS_H_ |
OLD | NEW |