67 lines
2.9 KiB
Diff
67 lines
2.9 KiB
Diff
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
|
|
index cac72c6a2fd1..2ed83a4af1b3 100644
|
|
--- 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;
|
|
@@ -183,6 +187,9 @@ class BrowserProcess {
|
|
// 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
|
|
index 9178909e6ce3..7656cbbb99c0 100644
|
|
--- chrome/browser/browser_process_impl.cc
|
|
+++ chrome/browser/browser_process_impl.cc
|
|
@@ -665,6 +665,10 @@ BrowserProcessImpl::system_network_context_manager() {
|
|
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
|
|
index 143e7442ca05..896829d2836f 100644
|
|
--- chrome/browser/browser_process_impl.h
|
|
+++ chrome/browser/browser_process_impl.h
|
|
@@ -140,6 +140,7 @@ class BrowserProcessImpl : public BrowserProcess,
|
|
// 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
|
|
index 62796358a2a7..9249ae2d07fa 100644
|
|
--- 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();
|