Skip to content

Commit

Permalink
[merge into m66]Remove the use of base::Unretained in ThreatDetail
Browse files Browse the repository at this point in the history
Since ThreatDetail is already a RefCountedThreadSafe object, no need to
use base::Unretained when binding it.

[email protected]

(cherry picked from commit b7b0550)

Bug: 817724
Change-Id: I6795f5df05848c978d60796f682fd2bcf83dffa8
Reviewed-on: https://chromium-review.googlesource.com/944194
Reviewed-by: Varun Khaneja <[email protected]>
Reviewed-by: Luke Z <[email protected]>
Commit-Queue: Jialiu Lin <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#540591}
Reviewed-on: https://chromium-review.googlesource.com/954606
Reviewed-by: Jialiu Lin <[email protected]>
Cr-Commit-Position: refs/branch-heads/3359@{#84}
Cr-Branched-From: 66afc5e-refs/heads/master@{#540276}
  • Loading branch information
Jialiu Lin committed Mar 8, 2018
1 parent 43780a5 commit 1a37f06
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/safe_browsing/browser/threat_details.cc
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ void ThreatDetails::StartCollection() {
// OnReceivedThreatDOMDetails will be called when the renderer replies.
// TODO(mattm): In theory, if the user proceeds through the warning DOM
// detail collection could be started once the page loads.
web_contents()->ForEachFrame(base::BindRepeating(
&ThreatDetails::RequestThreatDOMDetails, base::Unretained(this)));
web_contents()->ForEachFrame(
base::BindRepeating(&ThreatDetails::RequestThreatDOMDetails, this));
}
}

Expand All @@ -568,9 +568,9 @@ void ThreatDetails::RequestThreatDOMDetails(content::RenderFrameHost* frame) {
frame->GetRemoteInterfaces()->GetInterface(&threat_reporter);
safe_browsing::mojom::ThreatReporter* raw_threat_report =
threat_reporter.get();
raw_threat_report->GetThreatDOMDetails(base::BindOnce(
&ThreatDetails::OnReceivedThreatDOMDetails, base::Unretained(this),
base::Passed(&threat_reporter), frame));
raw_threat_report->GetThreatDOMDetails(
base::BindOnce(&ThreatDetails::OnReceivedThreatDOMDetails, this,
base::Passed(&threat_reporter), frame));
}

// When the renderer is done, this is called.
Expand Down

0 comments on commit 1a37f06

Please sign in to comment.