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

Unified Diff: ios/web/crw_network_activity_indicator_manager.mm

Issue 1023013002: Minor cleanup in ios/web utils (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 5 years, 9 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
« no previous file with comments | « no previous file | ios/web/history_state_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/crw_network_activity_indicator_manager.mm
diff --git a/ios/web/crw_network_activity_indicator_manager.mm b/ios/web/crw_network_activity_indicator_manager.mm
index ec8e0e39e9f4bd7d6080be885d1656a93faf82a9..683e293e4757345b5ad5ac6c1ec4a97381fdae07 100644
--- a/ios/web/crw_network_activity_indicator_manager.mm
+++ b/ios/web/crw_network_activity_indicator_manager.mm
@@ -26,7 +26,7 @@
return instance;
}
-- (id)init {
+- (instancetype)init {
self = [super init];
if (self) {
_groupCounts.reset([[NSMutableDictionary alloc] init]);
@@ -54,8 +54,7 @@
DCHECK_GT(count, 0U);
}
count += numTasks;
- [_groupCounts setObject:[NSNumber numberWithUnsignedInteger:count]
- forKey:group];
+ [_groupCounts setObject:@(count) forKey:group];
_totalCount += numTasks;
if (_totalCount == numTasks) {
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
@@ -74,8 +73,7 @@
if (count == 0) {
[_groupCounts removeObjectForKey:group];
} else {
- [_groupCounts setObject:[NSNumber numberWithUnsignedInteger:count]
- forKey:group];
+ [_groupCounts setObject:@(count) forKey:group];
}
_totalCount -= numTasks;
if (_totalCount == 0) {
@@ -111,5 +109,4 @@
return _totalCount;
}
-
@end
« no previous file with comments | « no previous file | ios/web/history_state_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698