Index: ios/chrome/app/application_delegate/metrics_mediator.mm |
diff --git a/ios/chrome/app/application_delegate/metrics_mediator.mm b/ios/chrome/app/application_delegate/metrics_mediator.mm |
index 074ff8fc2a82c280642aff2138f4664520ca87f4..c5954f0ff7f73717209d2b68dc11a20e8967be62 100644 |
--- a/ios/chrome/app/application_delegate/metrics_mediator.mm |
+++ b/ios/chrome/app/application_delegate/metrics_mediator.mm |
@@ -4,7 +4,6 @@ |
#import "ios/chrome/app/application_delegate/metrics_mediator.h" |
-#include "base/ios/weak_nsobject.h" |
#include "base/mac/bind_objc_block.h" |
#include "base/metrics/user_metrics_action.h" |
#include "base/strings/sys_string_conversions.h" |
@@ -240,16 +239,14 @@ using metrics_mediator::kAppEnteredBackgroundDateKey; |
// If metrics are enabled, process the logs. Otherwise, just delete them. |
base::mac::ScopedBlock<app_group::ProceduralBlockWithData> callback; |
if (enabled) { |
- callback.reset( |
- ^(NSData* log_content) { |
- std::string log(static_cast<const char*>([log_content bytes]), |
- static_cast<size_t>([log_content length])); |
- web::WebThread::PostTask(web::WebThread::UI, FROM_HERE, |
- base::BindBlock(^{ |
- metrics->PushExternalLog(log); |
- })); |
- }, |
- base::scoped_policy::RETAIN); |
+ callback.reset([^(NSData* log_content) { |
+ std::string log(static_cast<const char*>([log_content bytes]), |
+ static_cast<size_t>([log_content length])); |
+ web::WebThread::PostTask(web::WebThread::UI, FROM_HERE, |
+ base::BindBlockArc(^{ |
+ metrics->PushExternalLog(log); |
+ })); |
+ } copy]); |
} |
web::WebThread::PostTask( |