@@ -127,8 +127,7 @@ - (void)dealloc {
127
127
#pragma mark - Fetch Config API
128
128
129
129
- (void )fetchConfigWithExpirationDuration : (NSTimeInterval )expirationDuration
130
- completionHandler : (FIRRemoteConfigFetchCompletion)completionHandler
131
- excludeEtagHeaderForRealtime : (bool )excludeEtagHeaderForRealtime {
130
+ completionHandler : (FIRRemoteConfigFetchCompletion)completionHandler {
132
131
// Note: We expect the googleAppID to always be available.
133
132
BOOL hasDeviceContextChanged =
134
133
FIRRemoteConfigHasDeviceContextChanged (_settings.deviceContext , _options.googleAppID );
@@ -192,8 +191,7 @@ - (void)fetchConfigWithExpirationDuration:(NSTimeInterval)expirationDuration
192
191
withError: error];
193
192
}
194
193
strongSelf->_settings .isFetchInProgress = YES ;
195
- [strongSelf refreshInstallationsTokenWithCompletionHandler: completionHandler
196
- excludeEtagHeaderForRealtime: excludeEtagHeaderForRealtime];
194
+ [strongSelf refreshInstallationsTokenWithCompletionHandler: completionHandler];
197
195
});
198
196
}
199
197
@@ -205,8 +203,7 @@ - (NSString *)FIRAppNameFromFullyQualifiedNamespace {
205
203
// / Refresh installation ID token before fetching config. installation ID is now mandatory for fetch
206
204
// / requests to work.(b/14751422).
207
205
- (void )refreshInstallationsTokenWithCompletionHandler :
208
- (FIRRemoteConfigFetchCompletion)completionHandler
209
- excludeEtagHeaderForRealtime : (bool )excludeEtagHeaderForRealtime {
206
+ (FIRRemoteConfigFetchCompletion)completionHandler {
210
207
FIRInstallations *installations = [FIRInstallations
211
208
installationsWithApp: [FIRApp appNamed: [self FIRAppNameFromFullyQualifiedNamespace ]]];
212
209
if (!installations || !_options.GCMSenderID ) {
@@ -286,8 +283,7 @@ - (void)refreshInstallationsTokenWithCompletionHandler:
286
283
287
284
FIRLogInfo (kFIRLoggerRemoteConfig , @" I-RCN000022" , @" Success to get iid : %@ ." ,
288
285
strongSelfQueue->_settings .configInstallationsIdentifier );
289
- [strongSelf doFetchCall: completionHandler
290
- excludeEtagHeaderForRealtime: excludeEtagHeaderForRealtime];
286
+ [strongSelf doFetchCall: completionHandler];
291
287
});
292
288
}];
293
289
};
@@ -296,13 +292,10 @@ - (void)refreshInstallationsTokenWithCompletionHandler:
296
292
[installations authTokenWithCompletion: installationsTokenHandler];
297
293
}
298
294
299
- - (void )doFetchCall : (FIRRemoteConfigFetchCompletion)completionHandler
300
- excludeEtagHeaderForRealtime : (bool )excludeEtagHeaderForRealtime {
295
+ - (void )doFetchCall : (FIRRemoteConfigFetchCompletion)completionHandler {
301
296
[self getAnalyticsUserPropertiesWithCompletionHandler: ^(NSDictionary *userProperties) {
302
297
dispatch_async (self->_lockQueue , ^{
303
- [self fetchWithUserProperties: userProperties
304
- completionHandler: completionHandler
305
- excludeEtagHeaderForRealtime: excludeEtagHeaderForRealtime];
298
+ [self fetchWithUserProperties: userProperties completionHandler: completionHandler];
306
299
});
307
300
}];
308
301
}
@@ -329,8 +322,7 @@ - (void)reportCompletionOnHandler:(FIRRemoteConfigFetchCompletion)completionHand
329
322
}
330
323
331
324
- (void )fetchWithUserProperties : (NSDictionary *)userProperties
332
- completionHandler : (FIRRemoteConfigFetchCompletion)completionHandler
333
- excludeEtagHeaderForRealtime : (bool )excludeEtagHeaderForRealtime {
325
+ completionHandler : (FIRRemoteConfigFetchCompletion)completionHandler {
334
326
FIRLogDebug (kFIRLoggerRemoteConfig , @" I-RCN000061" , @" Fetch with user properties initiated." );
335
327
336
328
NSString *postRequestString = [_settings nextRequestWithUserProperties: userProperties];
@@ -523,10 +515,8 @@ - (void)fetchWithUserProperties:(NSDictionary *)userProperties
523
515
524
516
FIRLogDebug (kFIRLoggerRemoteConfig , @" I-RCN000061" , @" Making remote config fetch." );
525
517
526
- NSURLSessionDataTask *dataTask =
527
- [self URLSessionDataTaskWithContent: compressedContent
528
- completionHandler: fetcherCompletion
529
- excludeEtagHeaderForRealtime: excludeEtagHeaderForRealtime];
518
+ NSURLSessionDataTask *dataTask = [self URLSessionDataTaskWithContent: compressedContent
519
+ completionHandler: fetcherCompletion];
530
520
[dataTask resume ];
531
521
}
532
522
@@ -566,8 +556,7 @@ - (NSURLSession *)newFetchSession {
566
556
567
557
- (NSURLSessionDataTask *)URLSessionDataTaskWithContent : (NSData *)content
568
558
completionHandler :
569
- (RCNConfigFetcherCompletion)fetcherCompletion
570
- excludeEtagHeaderForRealtime : (bool )excludeEtagHeaderForRealtime {
559
+ (RCNConfigFetcherCompletion)fetcherCompletion {
571
560
NSURL *URL = [NSURL URLWithString: [self constructServerURL ]];
572
561
FIRLogDebug (kFIRLoggerRemoteConfig , @" I-RCN000046" , @" %@ " ,
573
562
[NSString stringWithFormat: @" Making config request: %@ " , [URL absoluteString ]]);
@@ -586,7 +575,7 @@ - (NSURLSessionDataTask *)URLSessionDataTaskWithContent:(NSData *)content
586
575
[URLRequest setValue: @" gzip" forHTTPHeaderField: kContentEncodingHeaderName ];
587
576
[URLRequest setValue: @" gzip" forHTTPHeaderField: kAcceptEncodingHeaderName ];
588
577
// Set the eTag from the last successful fetch, if available.
589
- if (_settings.lastETag && !excludeEtagHeaderForRealtime ) {
578
+ if (_settings.lastETag ) {
590
579
[URLRequest setValue: _settings.lastETag forHTTPHeaderField: kIfNoneMatchETagHeaderName ];
591
580
}
592
581
[URLRequest setHTTPBody: content];
0 commit comments