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..35281d5004365b1661caa239d3e21d3d6b9eeb9d 100644 |
| --- a/components/cronet/ios/Cronet.mm |
| +++ b/components/cronet/ios/Cronet.mm |
| @@ -233,10 +233,17 @@ class CronetHttpProtocolHandlerDelegate |
| config.protocolClasses = @[ [CRNPauseableHTTPProtocolHandler class] ]; |
| } |
| -+ (void)startNetLogToFile:(NSString*)fileName logBytes:(BOOL)logBytes { |
| ++ (BOOL)startNetLogToFile:(NSString*)fileName logBytes:(BOOL)logBytes { |
| if (gChromeNet.Get().get() && [fileName length]) { |
| - gChromeNet.Get()->StartNetLog([fileName UTF8String], logBytes); |
| + NSURL* file = |
| + [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory |
| + inDomains:NSUserDomainMask] |
| + lastObject] URLByAppendingPathComponent:fileName]; |
|
kapishnikov
2016/11/18 22:17:27
The documentation of the method implies that absol
lilyhoughton
2016/11/22 20:48:42
This is a documentation error. (Absolute path is
|
| + return gChromeNet.Get()->StartNetLog(base::SysNSStringToUTF8([file path]), |
| + logBytes); |
| } |
| + |
| + return NO; |
| } |
| + (void)stopNetLog { |