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

Side by Side Diff: ios/net/request_tracker.mm

Issue 1171203004: Correct iOS build for latest Xcode beta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « ios/net/ios_net.gyp ('k') | ios/public/test/test_updatable_resource_provider.mm » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "ios/net/request_tracker.h" 5 #include "ios/net/request_tracker.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "ios/net/clients/crn_forwarding_network_client.h" 8 #import "ios/net/clients/crn_forwarding_network_client.h"
9 #import "ios/net/clients/crn_forwarding_network_client_factory.h" 9 #import "ios/net/clients/crn_forwarding_network_client_factory.h"
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 // Gets the factories. 28 // Gets the factories.
29 NSArray* GetFactories() { 29 NSArray* GetFactories() {
30 DCHECK(thread_checker_.CalledOnValidThread()); 30 DCHECK(thread_checker_.CalledOnValidThread());
31 return factories_.get(); 31 return factories_.get();
32 } 32 }
33 33
34 // Adds a factory. 34 // Adds a factory.
35 void AddFactory(CRNForwardingNetworkClientFactory* factory) { 35 void AddFactory(CRNForwardingNetworkClientFactory* factory) {
36 DCHECK(thread_checker_.CalledOnValidThread()); 36 DCHECK(thread_checker_.CalledOnValidThread());
37 DCHECK_EQ(NSNotFound, [factories_ indexOfObject:factory]); 37 // TODO(justincohen): Cast indexOfObject to work around Xcode beta bugs.
38 // Revisit in future betas where hopefully these types match again.
39 // crbug.com/498825
40 DCHECK_EQ(NSNotFound,
41 static_cast<NSInteger>([factories_ indexOfObject:factory]));
38 DCHECK(!IsSelectorOverriden(factory, @selector(clientHandlingRequest:))); 42 DCHECK(!IsSelectorOverriden(factory, @selector(clientHandlingRequest:)));
39 DCHECK(!IsSelectorOverriden(factory, 43 DCHECK(!IsSelectorOverriden(factory,
40 @selector(clientHandlingResponse:request:))); 44 @selector(clientHandlingResponse:request:)));
41 DCHECK(!IsSelectorOverriden( 45 DCHECK(!IsSelectorOverriden(
42 factory, @selector(clientHandlingRedirect:url:response:))); 46 factory, @selector(clientHandlingRedirect:url:response:)));
43 [factories_ addObject:factory]; 47 [factories_ addObject:factory];
44 } 48 }
45 49
46 // Returns true if |factory| re-implements |selector|. 50 // Returns true if |factory| re-implements |selector|.
47 // Only used for debugging. 51 // Only used for debugging.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 DCHECK(thread_checker_.CalledOnValidThread()); 218 DCHECK(thread_checker_.CalledOnValidThread());
215 return cache_mode_; 219 return cache_mode_;
216 } 220 }
217 221
218 void RequestTracker::SetCacheMode(RequestTracker::CacheMode mode) { 222 void RequestTracker::SetCacheMode(RequestTracker::CacheMode mode) {
219 DCHECK(thread_checker_.CalledOnValidThread()); 223 DCHECK(thread_checker_.CalledOnValidThread());
220 cache_mode_ = mode; 224 cache_mode_ = mode;
221 } 225 }
222 226
223 } // namespace net 227 } // namespace net
OLDNEW
« no previous file with comments | « ios/net/ios_net.gyp ('k') | ios/public/test/test_updatable_resource_provider.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698