| Index: components/cronet/ios/Cronet.mm
|
| diff --git a/components/cronet/ios/Cronet.mm b/components/cronet/ios/Cronet.mm
|
| index 1f82a27d0bf872a3331a67445b1bc661e81b18a9..09b3c53b60f21dd13b510ea559f75abd1f0ecb15 100644
|
| --- a/components/cronet/ios/Cronet.mm
|
| +++ b/components/cronet/ios/Cronet.mm
|
| @@ -230,10 +230,21 @@ class CronetHttpProtocolHandlerDelegate
|
| config.protocolClasses = @[ [CRNPauseableHTTPProtocolHandler class] ];
|
| }
|
|
|
| -+ (void)startNetLogToFile:(NSString*)fileName logBytes:(BOOL)logBytes {
|
| - if (gChromeNet.Get().get() && [fileName length]) {
|
| - gChromeNet.Get()->StartNetLog([fileName UTF8String], logBytes);
|
| ++ (NSString*)getNetLogPathForFile:(NSString*)fileName {
|
| + return [[[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory
|
| + inDomains:NSUserDomainMask]
|
| + lastObject] URLByAppendingPathComponent:fileName] path];
|
| +}
|
| +
|
| ++ (BOOL)startNetLogToFile:(NSString*)fileName logBytes:(BOOL)logBytes {
|
| + if (gChromeNet.Get().get() && [fileName length] &&
|
| + ![fileName isAbsolutePath]) {
|
| + return gChromeNet.Get()->StartNetLog(
|
| + base::SysNSStringToUTF8([self getNetLogPathForFile:fileName]),
|
| + logBytes);
|
| }
|
| +
|
| + return NO;
|
| }
|
|
|
| + (void)stopNetLog {
|
|
|