Chromium Code Reviews| Index: components/cronet/ios/Cronet.mm |
| diff --git a/components/cronet/ios/Cronet.mm b/components/cronet/ios/Cronet.mm |
| index 150be2435ff32b9919574f60c8766995eb4f698b..66d6a97db63240bf05074be47d3836a302e71042 100644 |
| --- a/components/cronet/ios/Cronet.mm |
| +++ b/components/cronet/ios/Cronet.mm |
| @@ -233,10 +233,16 @@ class CronetHttpProtocolHandlerDelegate |
| config.protocolClasses = @[ [CRNPauseableHTTPProtocolHandler class] ]; |
| } |
| -+ (void)startNetLogToFile:(NSString*)fileName logBytes:(BOOL)logBytes { |
| ++ (bool)startNetLogToFile:(NSString*)fileName logBytes:(BOOL)logBytes { |
|
mef
2016/11/10 17:09:48
BOOL
lilyhoughton
2016/11/16 16:04:10
Done.
|
| if (gChromeNet.Get().get() && [fileName length]) { |
|
kapishnikov
2016/11/10 20:52:17
I think it would be better if we did the validatio
lilyhoughton
2016/11/16 16:04:10
I wanted to keep the obj-c wrapper as thin as poss
kapishnikov
2016/11/18 22:17:27
Acknowledged.
|
| - gChromeNet.Get()->StartNetLog([fileName UTF8String], logBytes); |
| + NSURL* file = |
| + [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory |
| + inDomains:NSUserDomainMask] |
| + lastObject] URLByAppendingPathComponent:fileName]; |
| + return gChromeNet.Get()->StartNetLog(base::SysNSStringToUTF8([file path]), logBytes); |
| } |
| + |
| + return false; |
|
kapishnikov
2016/11/10 20:52:17
Use 'NO' instead of 'false' since it is Objective
lilyhoughton
2016/11/16 16:04:10
Done.
|
| } |
| + (void)stopNetLog { |