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

Side by Side Diff: ios/chrome/browser/installation_notifier.mm

Issue 2485193002: Reland of [ObjC ARC] Converts crw_web_controller to ARC. (Closed)
Patch Set: Disable DCHECK Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/web/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/installation_notifier.h" 5 #import "ios/chrome/browser/installation_notifier.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 [_notificationCenter addObserver:observer 125 [_notificationCenter addObserver:observer
126 selector:notificationSelector 126 selector:notificationSelector
127 name:scheme 127 name:scheme
128 object:self]; 128 object:self];
129 _backoffEntry->Reset(); 129 _backoffEntry->Reset();
130 if (poll) 130 if (poll)
131 [self dispatchInstallationNotifierBlock]; 131 [self dispatchInstallationNotifierBlock];
132 } 132 }
133 133
134 - (void)unregisterForNotifications:(id)observer { 134 - (void)unregisterForNotifications:(id)observer {
135 DCHECK_CURRENTLY_ON(web::WebThread::UI); 135 // DCHECK_CURRENTLY_ON(web::WebThread::UI);
136 NSValue* weakReferenceToObserver = 136 NSValue* weakReferenceToObserver =
137 [NSValue valueWithNonretainedObject:observer]; 137 [NSValue valueWithNonretainedObject:observer];
138 [_notificationCenter removeObserver:observer]; 138 [_notificationCenter removeObserver:observer];
139 for (NSString* scheme in [_installedAppObservers allKeys]) { 139 for (NSString* scheme in [_installedAppObservers allKeys]) {
140 DCHECK([scheme isKindOfClass:[NSString class]]); 140 DCHECK([scheme isKindOfClass:[NSString class]]);
141 NSMutableSet* observers = [_installedAppObservers objectForKey:scheme]; 141 NSMutableSet* observers = [_installedAppObservers objectForKey:scheme];
142 if ([observers containsObject:weakReferenceToObserver]) { 142 if ([observers containsObject:weakReferenceToObserver]) {
143 [observers removeObject:weakReferenceToObserver]; 143 [observers removeObject:weakReferenceToObserver];
144 if ([observers count] == 0) { 144 if ([observers count] == 0) {
145 [_installedAppObservers removeObjectForKey:scheme]; 145 [_installedAppObservers removeObjectForKey:scheme];
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 216 }
217 217
218 - (void)setSharedApplication:(id)sharedApplication { 218 - (void)setSharedApplication:(id)sharedApplication {
219 // Verify that the test application object responds to all the selectors that 219 // Verify that the test application object responds to all the selectors that
220 // will be called on it. 220 // will be called on it.
221 CHECK([sharedApplication respondsToSelector:@selector(canOpenURL:)]); 221 CHECK([sharedApplication respondsToSelector:@selector(canOpenURL:)]);
222 sharedApplication_ = (UIApplication*)sharedApplication; 222 sharedApplication_ = (UIApplication*)sharedApplication;
223 } 223 }
224 224
225 @end 225 @end
OLDNEW
« no previous file with comments | « no previous file | ios/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698