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 #include "chrome/renderer/safe_browsing/threat_dom_details.h" | 5 #include "chrome/renderer/safe_browsing/threat_dom_details.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "chrome/common/chrome_constants.h" | 8 #include "chrome/common/chrome_constants.h" |
9 #include "chrome/common/safe_browsing/safebrowsing_messages.h" | 9 #include "chrome/common/safe_browsing/safebrowsing_messages.h" |
10 #include "content/public/renderer/render_view.h" | 10 #include "content/public/renderer/render_view.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 SafeBrowsingHostMsg_ThreatDOMDetails_Node child_node; | 40 SafeBrowsingHostMsg_ThreatDOMDetails_Node child_node; |
41 child_node.url = child_url; | 41 child_node.url = child_url; |
42 child_node.tag_name = element.tagName().utf8(); | 42 child_node.tag_name = element.tagName().utf8(); |
43 child_node.parent = parent_node->url; | 43 child_node.parent = parent_node->url; |
44 resources->push_back(child_node); | 44 resources->push_back(child_node); |
45 } | 45 } |
46 | 46 |
47 } // namespace | 47 } // namespace |
48 | 48 |
49 // An upper limit on the number of nodes we collect. | 49 // An upper limit on the number of nodes we collect. |
50 uint32 ThreatDOMDetails::kMaxNodes = 500; | 50 uint32_t ThreatDOMDetails::kMaxNodes = 500; |
51 | 51 |
52 // static | 52 // static |
53 ThreatDOMDetails* ThreatDOMDetails::Create(content::RenderView* render_view) { | 53 ThreatDOMDetails* ThreatDOMDetails::Create(content::RenderView* render_view) { |
54 // Private constructor and public static Create() method to facilitate | 54 // Private constructor and public static Create() method to facilitate |
55 // stubbing out this class for binary-size reduction purposes. | 55 // stubbing out this class for binary-size reduction purposes. |
56 return new ThreatDOMDetails(render_view); | 56 return new ThreatDOMDetails(render_view); |
57 } | 57 } |
58 | 58 |
59 ThreatDOMDetails::ThreatDOMDetails(content::RenderView* render_view) | 59 ThreatDOMDetails::ThreatDOMDetails(content::RenderView* render_view) |
60 : content::RenderViewObserver(render_view) {} | 60 : content::RenderViewObserver(render_view) {} |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 return; | 110 return; |
111 } | 111 } |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
115 resources->push_back(details_node); | 115 resources->push_back(details_node); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 } // namespace safe_browsing | 119 } // namespace safe_browsing |
OLD | NEW |