Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: components/safe_browsing/renderer/threat_dom_details.cc

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/safe_browsing/renderer/threat_dom_details.cc
diff --git a/components/safe_browsing/renderer/threat_dom_details.cc b/components/safe_browsing/renderer/threat_dom_details.cc
index 0a36545b6c535e0ed57da21f4d0b95786ccc141a..c3d712b38a78516a219e4e7d165a303a23affc6c 100644
--- a/components/safe_browsing/renderer/threat_dom_details.cc
+++ b/components/safe_browsing/renderer/threat_dom_details.cc
@@ -6,6 +6,7 @@
#include <algorithm>
#include <map>
+#include <string>
#include <unordered_set>
#include "base/compiler_specific.h"
@@ -108,7 +109,7 @@ SafeBrowsingHostMsg_ThreatDOMDetails_Node* GetNodeForElement(
const blink::WebNode& element,
const safe_browsing::ElementToNodeMap& element_to_node_map,
std::vector<SafeBrowsingHostMsg_ThreatDOMDetails_Node>* resources) {
- DCHECK(element_to_node_map.count(element) > 0);
+ DCHECK_GT(element_to_node_map.count(element), 0u);
size_t resource_index = element_to_node_map.at(element);
return &(resources->at(resource_index));
}
@@ -280,7 +281,7 @@ void ThreatDOMDetails::OnGetThreatDOMDetails() {
void ThreatDOMDetails::ExtractResources(
std::vector<SafeBrowsingHostMsg_ThreatDOMDetails_Node>* resources) {
- blink::WebFrame* frame = render_frame()->GetWebFrame();
+ blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
if (!frame)
return;
SafeBrowsingHostMsg_ThreatDOMDetails_Node details_node;

Powered by Google App Engine
This is Rietveld 408576698