iOS: Netlog does not start if [Cronet startNetLogToFile] is called before the engine start |
||||||
Issue descriptionIf [Cronet start] is called after [Cronet startNetLogToFile...] the netlog does not start and no error messages are show in the log, e.g. [Cronet startNetLogToFile: @"Documents/cronet_netlog.json" logBytes:YES]; [Cronet start]; In Android we have a queue of tasks that is delayed until the engine starts. Maybe we should do something similar for iOS too. In addition we should update the doc to explain what arguments are expected by startNetLogToFile and where the result can be found.
,
Jul 25 2016
This could/should be addressed by refactoring CronetEngine to follow Builder design pattern, similar to Android. In this case startNetLogToFile method will be implemented by the running CronetEngine class as opposed to CronetBuilder classe used for configuration. Does it make sense? Does it match iOS API concepts, or is there more different common pattern?
,
Jul 25 2016
Builder pattern is not a common approach on iOS. On the other hand Cronet Objective-C class does not look like canonical iOS code either, but rather like a port from Java. So if Cronet will be refactored to follow builder pattern it will remain the same Java-looking class, and maybe that's something that you are OK to have. If the goal is to make Cronet looks like canonical code then I can help if you give me more information: f.e. Why is it ok to call different start methods w/o |stop| call between them?
,
Oct 4 2016
,
Oct 4 2016
Misha said this also depends on the refactoring work to make iOS Cronet more like the Android counterpart (The Config pattern).
,
Sep 14 2017
,
Aug 1
,
Aug 2
lilyhoughton@ is no longer working on Chromium but [Cronet startNetLogToFile] now returns BOOL so app could check whether it has succeeded, so I'll close this as fixed. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by pkl@chromium.org
, Jul 25 2016Status: Available (was: Untriaged)