fix: make navigator.userAgentData non-empty (#34481)

This commit is contained in:
Jeremy Rose 2022-06-13 09:35:42 -07:00 committed by GitHub
parent 8157a01a42
commit 954fd72500
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 92 additions and 13 deletions

View file

@ -85,6 +85,7 @@ class ElectronBrowserContext : public content::BrowserContext {
void SetUserAgent(const std::string& user_agent);
std::string GetUserAgent() const;
absl::optional<std::string> GetUserAgentOverride() const;
bool CanUseHttpCache() const;
int GetMaxCacheSize() const;
ResolveProxyHelper* GetResolveProxyHelper();
@ -170,7 +171,7 @@ class ElectronBrowserContext : public content::BrowserContext {
std::unique_ptr<predictors::PreconnectManager> preconnect_manager_;
std::unique_ptr<ProtocolRegistry> protocol_registry_;
std::string user_agent_;
absl::optional<std::string> user_agent_;
base::FilePath path_;
bool in_memory_ = false;
bool use_cache_ = true;