OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/web/crw_network_activity_indicator_manager.h" | 5 #import "ios/web/crw_network_activity_indicator_manager.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 #include "base/threading/thread_checker.h" | 11 #include "base/threading/thread_checker.h" |
12 | 12 |
| 13 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 14 #error "This file requires ARC support." |
| 15 #endif |
| 16 |
13 @interface CRWNetworkActivityIndicatorManager () { | 17 @interface CRWNetworkActivityIndicatorManager () { |
14 base::scoped_nsobject<NSMutableDictionary> _groupCounts; | 18 base::scoped_nsobject<NSMutableDictionary> _groupCounts; |
15 NSUInteger _totalCount; | 19 NSUInteger _totalCount; |
16 base::ThreadChecker _threadChecker; | 20 base::ThreadChecker _threadChecker; |
17 } | 21 } |
18 | 22 |
19 @end | 23 @end |
20 | 24 |
21 @implementation CRWNetworkActivityIndicatorManager | 25 @implementation CRWNetworkActivityIndicatorManager |
22 | 26 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 107 } |
104 return [number unsignedIntegerValue]; | 108 return [number unsignedIntegerValue]; |
105 } | 109 } |
106 | 110 |
107 - (NSUInteger)numTotalNetworkTasks { | 111 - (NSUInteger)numTotalNetworkTasks { |
108 DCHECK(_threadChecker.CalledOnValidThread()); | 112 DCHECK(_threadChecker.CalledOnValidThread()); |
109 return _totalCount; | 113 return _totalCount; |
110 } | 114 } |
111 | 115 |
112 @end | 116 @end |
OLD | NEW |