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

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 browser_tests after rebase 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 53df55a93029bdb9fb57a37f9c17a49570769d40..9192b4dd13d04726c11d702db8c027fae09bcb45 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -863,7 +863,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.
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698