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

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

Issue 2821193005: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/safe_browsing (Closed)
Patch Set: Created 3 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
Index: chrome/browser/safe_browsing/notification_image_reporter.cc
diff --git a/chrome/browser/safe_browsing/notification_image_reporter.cc b/chrome/browser/safe_browsing/notification_image_reporter.cc
index d9e53ac7c1878c173cee6d094306ef0d70e1e334..89499fabdf46edcc9bfa12113244d2c25fe43d0e 100644
--- a/chrome/browser/safe_browsing/notification_image_reporter.cc
+++ b/chrome/browser/safe_browsing/notification_image_reporter.cc
@@ -113,8 +113,8 @@ void NotificationImageReporter::ReportNotificationImageOnIO(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- base::Bind(&NotificationImageReporter::ReportNotificationImageOnUI,
- weak_factory_on_io_.GetWeakPtr(), profile, origin, image));
+ base::BindOnce(&NotificationImageReporter::ReportNotificationImageOnUI,
+ weak_factory_on_io_.GetWeakPtr(), profile, origin, image));
}
double NotificationImageReporter::GetReportChance() const {
@@ -146,14 +146,14 @@ void NotificationImageReporter::ReportNotificationImageOnUI(
if (GetExtendedReportingLevel(*profile->GetPrefs()) != SBER_LEVEL_SCOUT) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&NotificationImageReporter::SkippedReporting,
- weak_this_on_io));
+ base::BindOnce(&NotificationImageReporter::SkippedReporting,
+ weak_this_on_io));
return;
}
BrowserThread::GetBlockingPool()->PostWorkerTask(
FROM_HERE,
- base::Bind(
+ base::BindOnce(
&NotificationImageReporter::DownscaleNotificationImageOnBlockingPool,
weak_this_on_io, origin, image));
}
@@ -187,10 +187,11 @@ void NotificationImageReporter::DownscaleNotificationImageOnBlockingPool(
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&NotificationImageReporter::SendReportOnIO, weak_this_on_io,
- origin, base::RefCountedBytes::TakeVector(&png_bytes),
- gfx::Size(downscaled_image.width(), downscaled_image.height()),
- gfx::Size(image.width(), image.height())));
+ base::BindOnce(
+ &NotificationImageReporter::SendReportOnIO, weak_this_on_io, origin,
+ base::RefCountedBytes::TakeVector(&png_bytes),
+ gfx::Size(downscaled_image.width(), downscaled_image.height()),
+ gfx::Size(image.width(), image.height())));
}
void NotificationImageReporter::SendReportOnIO(

Powered by Google App Engine
This is Rietveld 408576698