fix: navigator.connection
not working as intended (#38491)
* fix: navigator.connection not working as intended * chore: make network quality methods private
This commit is contained in:
parent
67f273a6d6
commit
57147d1b8d
4 changed files with 57 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "components/prefs/pref_service.h"
|
||||
#include "components/prefs/value_map_pref_store.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "services/network/public/cpp/network_quality_tracker.h"
|
||||
#include "services/network/public/cpp/shared_url_loader_factory.h"
|
||||
#include "shell/browser/net/system_network_context_manager.h"
|
||||
|
||||
|
@ -45,6 +46,7 @@ class BrowserProcessImpl : public BrowserProcess {
|
|||
BuildState* GetBuildState() override;
|
||||
void PostEarlyInitialization();
|
||||
void PreCreateThreads();
|
||||
void PreMainMessageLoopRun();
|
||||
void PostDestroyThreads() {}
|
||||
void PostMainMessageLoopRun();
|
||||
|
||||
|
@ -113,6 +115,9 @@ class BrowserProcessImpl : public BrowserProcess {
|
|||
std::unique_ptr<device::GeolocationManager> geolocation_manager) override;
|
||||
|
||||
private:
|
||||
void CreateNetworkQualityObserver();
|
||||
network::NetworkQualityTracker* GetNetworkQualityTracker();
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
|
||||
#endif
|
||||
|
@ -121,6 +126,11 @@ class BrowserProcessImpl : public BrowserProcess {
|
|||
std::string locale_;
|
||||
std::string system_locale_;
|
||||
embedder_support::OriginTrialsSettingsStorage origin_trials_settings_storage_;
|
||||
|
||||
std::unique_ptr<network::NetworkQualityTracker> network_quality_tracker_;
|
||||
std::unique_ptr<
|
||||
network::NetworkQualityTracker::RTTAndThroughputEstimatesObserver>
|
||||
network_quality_observer_;
|
||||
};
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue