| Index: ios/chrome/app/deferred_initialization_runner.mm
|
| diff --git a/ios/chrome/app/deferred_initialization_runner.mm b/ios/chrome/app/deferred_initialization_runner.mm
|
| index 7e175b4c47d604cae0d502d959e5e4f3231a851b..31a396807229039913f5772799e7fe1feaed9db3 100644
|
| --- a/ios/chrome/app/deferred_initialization_runner.mm
|
| +++ b/ios/chrome/app/deferred_initialization_runner.mm
|
| @@ -6,11 +6,14 @@
|
|
|
| #include <stdint.h>
|
|
|
| -#import "base/ios/weak_nsobject.h"
|
| #include "base/logging.h"
|
| #include "base/mac/scoped_block.h"
|
| #include "base/mac/scoped_nsobject.h"
|
|
|
| +#if !defined(__has_feature) || !__has_feature(objc_arc)
|
| +#error "This file requires ARC support."
|
| +#endif
|
| +
|
| // An object encapsulating the deferred execution of a block of initialization
|
| // code.
|
| @interface DeferredInitializationBlock : NSObject {
|
| @@ -47,7 +50,7 @@
|
| self = [super init];
|
| if (self) {
|
| _name.reset([name copy]);
|
| - _runBlock.reset(block, base::scoped_policy::RETAIN);
|
| + _runBlock.reset(block);
|
| }
|
| return self;
|
| }
|
| @@ -102,8 +105,8 @@
|
| - (instancetype)init {
|
| self = [super init];
|
| if (self) {
|
| - _blocksNameQueue.reset([[NSMutableArray array] retain]);
|
| - _runBlocks.reset([[NSMutableDictionary dictionary] retain]);
|
| + _blocksNameQueue.reset([NSMutableArray array]);
|
| + _runBlocks.reset([NSMutableDictionary dictionary]);
|
| _isBlockScheduled = NO;
|
| _delayBetweenBlocks = 0.2;
|
| _delayBeforeFirstBlock = 3.0;
|
| @@ -137,8 +140,7 @@
|
| [_runBlocks objectForKey:nextBlockName];
|
| DCHECK(nextBlock);
|
|
|
| - base::WeakNSObject<DeferredInitializationRunner> weakSelf(self);
|
| -
|
| + __weak DeferredInitializationRunner* weakSelf = self;
|
| dispatch_after(
|
| dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)),
|
| dispatch_get_main_queue(), ^{
|
|
|