It calls WriteToFileNetLogObserver::StartObserving() with a nullptr URLRequestContext*: https://cs.chromium.org/chromium/src/net/log/write_to_file_net_log_observer.cc?sq=package:chromium&dr=CSs&rcl=1483719782&l=35
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8ae679d977a7eb3c784d7bc6483cdf74400b52bd commit 8ae679d977a7eb3c784d7bc6483cdf74400b52bd Author: wangyix <wangyix@google.com> Date: Sat Jan 28 01:47:40 2017 Move net-export thread-hopping code into NetLogFileWriter and add IO polled data. (1) Use net::FileNetLogObserver in place of net::WriteToFileNetLogObserver for chrome://net-export (which is a big part of crbug.com/679030 ). (2) Move NetLogFileWriter's public interface from the FILE_USER_BLOCKING to the UI thread (internalizing the post tasks to file thread/UI thread to simplify things) (3) Add plumbing for passing polled data, which will be collected on both the UI thread and IO thread ( crbug.com/438656 ). Some of the refactor done will also facilitate crbug.com/679021 , which is just a few extra lines. In this CL, only the polled data from the IO thread will be retrieved; the UI thread polled data will be added in a follow-up CL. BUG= 679030 , 438656 , 679021 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2603523002 Cr-Commit-Position: refs/heads/master@{#446875} [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/chrome/browser/ui/webui/net_export_ui.cc [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/components/cronet/android/cronet_url_request_context_adapter.cc [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/components/net_log/BUILD.gn [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/components/net_log/net_log_file_writer.cc [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/components/net_log/net_log_file_writer.h [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/components/net_log/net_log_file_writer_unittest.cc [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/components/net_log/resources/net_export.js [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/ios/chrome/browser/ui/webui/net_export/BUILD.gn [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/ios/chrome/browser/ui/webui/net_export/net_export_ui.cc [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/net/log/file_net_log_observer.cc [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/net/log/file_net_log_observer.h [modify] https://crrev.com/8ae679d977a7eb3c784d7bc6483cdf74400b52bd/net/log/file_net_log_observer_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf commit 179c480dc64ee7b8a7b8927a8ff4cc15e04071cf Author: wangyix <wangyix@google.com> Date: Fri Feb 24 23:29:28 2017 Add ongoing events to net-export log when logging starts Update NetLogFileWriter::StartNetLog() to take a list of URLRequestContextGetters from which to retrieve ongoing events to add to the log. Refactor FileNetLogObserver so log entries (specifically, entries for ongoing events) can be manually added from outside the class before it's attached to ChromeNetLog. Add helper function to NetExportMessageHandler that retrieves a list of URLRequestContextGetters from which ongoing events are retrieved. BUG= 679021 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2698143004 Cr-Commit-Position: refs/heads/master@{#452993} [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/chrome/browser/ui/webui/net_export_ui.cc [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/components/cronet/android/cronet_url_request_context_adapter.cc [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/components/net_log/net_log_file_writer.cc [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/components/net_log/net_log_file_writer.h [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/components/net_log/net_log_file_writer_unittest.cc [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/ios/chrome/browser/ui/webui/net_export/net_export_ui.cc [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/net/log/file_net_log_observer.cc [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/net/log/file_net_log_observer.h [modify] https://crrev.com/179c480dc64ee7b8a7b8927a8ff4cc15e04071cf/net/log/file_net_log_observer_unittest.cc
Comment 1 by eroman@chromium.org
, Jan 6 2017