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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 11347005: Change SafeBrowsingProtocolManager::GetFullHash signature. (Closed) Base URL: http://git.chromium.org/chromium/src.git@in_progress
Patch Set: Fix rebase with browser_test Created 8 years, 2 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: chrome/browser/safe_browsing/safe_browsing_service.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 7494871d701ca667fd9a7543568887ca61cc8ffb..f90f94355cc2777896bea92c1b818f3f84323c39 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -864,7 +864,14 @@ void SafeBrowsingService::OnCheckDone(SafeBrowsingCheck* check) {
// Reset the start time so that we can measure the network time without the
// database time.
check->start = base::TimeTicks::Now();
- protocol_manager_->GetFullHash(check, check->prefix_hits);
+ // Note: If |this| is deleted or stopped, the protocol_manager will
+ // be destroyed as well - hence it's OK to do unretained in this case.
+ protocol_manager_->GetFullHash(
+ check->prefix_hits,
+ base::Bind(&SafeBrowsingService::HandleGetHashResults,
+ base::Unretained(this),
+ check),
+ check->is_download);
} else {
// We may have cached results for previous GetHash queries. Since
// this data comes from cache, don't histogram hits.

Powered by Google App Engine
This is Rietveld 408576698