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

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

Issue 1060033003: [chrome/browser/safe_browsing] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test break now Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/browser_feature_extractor.cc
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc
index b63d8bae7110050f0be810acc19f0a06bf81e1eb..ab5bbf47c7a4ed90df788aa0c1258b83b96e2330 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc
@@ -43,7 +43,7 @@ const int kMaxMalwareIPPerRequest = 5;
void FilterBenignIpsOnIOThread(
scoped_refptr<SafeBrowsingDatabaseManager> database_manager,
IPUrlMap* ips) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (IPUrlMap::iterator it = ips->begin(); it != ips->end();) {
if (!database_manager.get() ||
!database_manager->MatchMalwareIP(it->first)) {
@@ -179,7 +179,7 @@ BrowserFeatureExtractor::~BrowserFeatureExtractor() {
void BrowserFeatureExtractor::ExtractFeatures(const BrowseInfo* info,
ClientPhishingRequest* request,
const DoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(request);
DCHECK(info);
DCHECK_EQ(0U, request->url().find("http:"));
@@ -248,7 +248,7 @@ void BrowserFeatureExtractor::ExtractMalwareFeatures(
BrowseInfo* info,
ClientMalwareRequest* request,
const MalwareDoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!callback.is_null());
// Grab the IPs because they might go away before we're done
@@ -302,7 +302,7 @@ void BrowserFeatureExtractor::ExtractBrowseInfoFeatures(
void BrowserFeatureExtractor::StartExtractFeatures(
scoped_ptr<ClientPhishingRequest> request,
const DoneCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
history::HistoryService* history;
if (!request || !request->IsInitialized() || !GetHistoryService(&history)) {
callback.Run(false, request.Pass());
@@ -324,7 +324,7 @@ void BrowserFeatureExtractor::QueryUrlHistoryDone(
bool success,
const history::URLRow& row,
const history::VisitVector& visits) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(request);
DCHECK(!callback.is_null());
if (!success) {
@@ -391,7 +391,7 @@ void BrowserFeatureExtractor::QueryHttpHostVisitsDone(
bool success,
int num_visits,
base::Time first_visit) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(request);
DCHECK(!callback.is_null());
if (!success) {
@@ -422,7 +422,7 @@ void BrowserFeatureExtractor::QueryHttpsHostVisitsDone(
bool success,
int num_visits,
base::Time first_visit) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(request);
DCHECK(!callback.is_null());
if (!success) {
@@ -473,7 +473,7 @@ void BrowserFeatureExtractor::FinishExtractMalwareFeatures(
scoped_ptr<IPUrlMap> bad_ips,
MalwareDoneCallback callback,
scoped_ptr<ClientMalwareRequest> request) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
int matched_bad_ips = 0;
for (IPUrlMap::const_iterator it = bad_ips->begin();
it != bad_ips->end(); ++it) {
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698