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

Unified Diff: ios/chrome/app/application_delegate/metrics_mediator.mm

Issue 2621943002: [ObjC ARC] Converts ios/chrome/app/application_delegate:application_delegate_internal to ARC. (Closed)
Patch Set: add dependency on ios/chrome/common/app_group:main_app Created 3 years, 11 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: 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(

Powered by Google App Engine
This is Rietveld 408576698