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

Unified Diff: components/safe_browsing_db/v4_local_database_manager.cc

Issue 2421703002: Tiny: Post PerformFullHashCheck on IO thread, instead of calling it synchronously. (Closed)
Patch Set: Add comment about why PerformFullHashCheck is being posted Created 4 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: components/safe_browsing_db/v4_local_database_manager.cc
diff --git a/components/safe_browsing_db/v4_local_database_manager.cc b/components/safe_browsing_db/v4_local_database_manager.cc
index 65916ba8ea63a77a7d0be73760239c84bef4e02a..e640abe9d62121bd5014e2fd59ca4ca61eaa795d 100644
--- a/components/safe_browsing_db/v4_local_database_manager.cc
+++ b/components/safe_browsing_db/v4_local_database_manager.cc
@@ -149,7 +149,13 @@ bool V4LocalDatabaseManager::CheckBrowseUrl(const GURL& url, Client* client) {
return true;
}
- PerformFullHashCheck(std::move(check), full_hash_to_store_and_hash_prefixes);
+ // Post the task to check full hashes back on the IO thread to follow the
+ // documented behavior of CheckBrowseUrl.
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(&V4LocalDatabaseManager::PerformFullHashCheck, this,
+ base::Passed(std::move(check)),
+ full_hash_to_store_and_hash_prefixes));
return false;
}

Powered by Google App Engine
This is Rietveld 408576698