2018-10-24 22:37:39 +02:00
|
|
|
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
|
2018-11-30 23:21:07 +01:00
|
|
|
index cac72c6a2fd1..2ed83a4af1b3 100644
|
2018-10-24 22:37:39 +02:00
|
|
|
--- chrome/browser/browser_process.h
|
|
|
|
+++ chrome/browser/browser_process.h
|
|
|
|
@@ -39,6 +39,10 @@ class SystemNetworkContextManager;
|
|
|
|
class WatchDogThread;
|
|
|
|
class WebRtcLogUploader;
|
|
|
|
|
|
|
|
+namespace net_log {
|
|
|
|
+class NetExportFileWriter;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
namespace network {
|
|
|
|
class NetworkQualityTracker;
|
|
|
|
class SharedURLLoaderFactory;
|
2018-11-30 23:21:07 +01:00
|
|
|
@@ -183,6 +187,9 @@ class BrowserProcess {
|
2018-10-24 22:37:39 +02:00
|
|
|
// backed by the IOThread's URLRequestContext.
|
|
|
|
virtual SystemNetworkContextManager* system_network_context_manager() = 0;
|
|
|
|
|
|
|
|
+ // Provide direct accessor for CEF.
|
|
|
|
+ virtual net_log::NetExportFileWriter* net_export_file_writer() = 0;
|
|
|
|
+
|
|
|
|
// Returns a NetworkQualityTracker that can be used to subscribe for
|
|
|
|
// network quality change events.
|
|
|
|
virtual network::NetworkQualityTracker* network_quality_tracker() = 0;
|
|
|
|
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
|
2019-02-01 17:42:40 +01:00
|
|
|
index 31234258792d..36ba13242a9c 100644
|
2018-10-24 22:37:39 +02:00
|
|
|
--- chrome/browser/browser_process_impl.cc
|
|
|
|
+++ chrome/browser/browser_process_impl.cc
|
2019-02-01 17:42:40 +01:00
|
|
|
@@ -665,6 +665,10 @@ BrowserProcessImpl::system_network_context_manager() {
|
2018-10-24 22:37:39 +02:00
|
|
|
return SystemNetworkContextManager::GetInstance();
|
|
|
|
}
|
|
|
|
|
|
|
|
+net_log::NetExportFileWriter* BrowserProcessImpl::net_export_file_writer() {
|
|
|
|
+ return system_network_context_manager()->GetNetExportFileWriter();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
scoped_refptr<network::SharedURLLoaderFactory>
|
|
|
|
BrowserProcessImpl::shared_url_loader_factory() {
|
|
|
|
return system_network_context_manager()->GetSharedURLLoaderFactory();
|
|
|
|
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
|
2019-02-21 01:42:36 +01:00
|
|
|
index 7168c719aa25..bae7162a539c 100644
|
2018-10-24 22:37:39 +02:00
|
|
|
--- chrome/browser/browser_process_impl.h
|
|
|
|
+++ chrome/browser/browser_process_impl.h
|
2018-12-26 16:12:11 +01:00
|
|
|
@@ -140,6 +140,7 @@ class BrowserProcessImpl : public BrowserProcess,
|
2018-10-24 22:37:39 +02:00
|
|
|
// TODO(qinmin): Remove this method as callers can retrieve the global
|
|
|
|
// instance from SystemNetworkContextManager directly.
|
|
|
|
SystemNetworkContextManager* system_network_context_manager() override;
|
|
|
|
+ net_log::NetExportFileWriter* net_export_file_writer() override;
|
|
|
|
scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory()
|
|
|
|
override;
|
|
|
|
network::NetworkQualityTracker* network_quality_tracker() override;
|
|
|
|
diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc
|
2018-11-03 02:15:09 +01:00
|
|
|
index 62796358a2a7..9249ae2d07fa 100644
|
2018-10-24 22:37:39 +02:00
|
|
|
--- chrome/browser/ui/webui/net_export_ui.cc
|
|
|
|
+++ chrome/browser/ui/webui/net_export_ui.cc
|
|
|
|
@@ -159,8 +159,7 @@ class NetExportMessageHandler
|
|
|
|
};
|
|
|
|
|
|
|
|
NetExportMessageHandler::NetExportMessageHandler()
|
|
|
|
- : file_writer_(g_browser_process->system_network_context_manager()
|
|
|
|
- ->GetNetExportFileWriter()),
|
|
|
|
+ : file_writer_(g_browser_process->net_export_file_writer()),
|
|
|
|
state_observer_manager_(this),
|
|
|
|
weak_ptr_factory_(this) {
|
|
|
|
file_writer_->Initialize();
|