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

Side by Side Diff: components/cronet/ios/Cronet.mm

Issue 2502683003: [Cronet] change InitializeOnNetworkThread to use URLRequestContextBuilder (Closed)
Patch Set: Sync Created 4 years 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 | components/cronet/ios/cronet_environment.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/cronet/ios/Cronet.h" 5 #import "components/cronet/ios/Cronet.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 } // namespace 102 } // namespace
103 103
104 @implementation Cronet 104 @implementation Cronet
105 105
106 + (void)configureCronetEnvironmentForTesting: 106 + (void)configureCronetEnvironmentForTesting:
107 (cronet::CronetEnvironment*)cronetEnvironment { 107 (cronet::CronetEnvironment*)cronetEnvironment {
108 if (gEnableTestCertVerifierForTesting) { 108 if (gEnableTestCertVerifierForTesting) {
109 std::unique_ptr<TestCertVerifier> test_cert_verifier = 109 std::unique_ptr<TestCertVerifier> test_cert_verifier =
110 base::MakeUnique<TestCertVerifier>(); 110 base::MakeUnique<TestCertVerifier>();
111 cronetEnvironment->set_cert_verifier(std::move(test_cert_verifier)); 111 cronetEnvironment->set_mock_cert_verifier(std::move(test_cert_verifier));
112 } 112 }
113 } 113 }
114 114
115 + (NSString*)getAcceptLanguages { 115 + (NSString*)getAcceptLanguages {
116 // Use the framework bundle to search for resources. 116 // Use the framework bundle to search for resources.
117 NSBundle* frameworkBundle = [NSBundle bundleForClass:self]; 117 NSBundle* frameworkBundle = [NSBundle bundleForClass:self];
118 NSString* bundlePath = 118 NSString* bundlePath =
119 [frameworkBundle pathForResource:@"cronet_resources" ofType:@"bundle"]; 119 [frameworkBundle pathForResource:@"cronet_resources" ofType:@"bundle"];
120 NSBundle* bundle = [NSBundle bundleWithPath:bundlePath]; 120 NSBundle* bundle = [NSBundle bundleWithPath:bundlePath];
121 NSString* acceptLanguages = NSLocalizedStringWithDefaultValue( 121 NSString* acceptLanguages = NSLocalizedStringWithDefaultValue(
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 base::SysNSStringToUTF8(hostResolverRulesForTesting)); 279 base::SysNSStringToUTF8(hostResolverRulesForTesting));
280 } 280 }
281 281
282 // This is a non-public dummy method that prevents the linker from stripping out 282 // This is a non-public dummy method that prevents the linker from stripping out
283 // the otherwise non-referenced methods from 'bidirectional_stream.cc'. 283 // the otherwise non-referenced methods from 'bidirectional_stream.cc'.
284 + (void)preventStrippingCronetBidirectionalStream { 284 + (void)preventStrippingCronetBidirectionalStream {
285 bidirectional_stream_create(NULL, 0, 0); 285 bidirectional_stream_create(NULL, 0, 0);
286 } 286 }
287 287
288 @end 288 @end
OLDNEW
« no previous file with comments | « no previous file | components/cronet/ios/cronet_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698