diff options
author | Martin Robinson <mrobinson@igalia.com> | 2025-04-02 00:59:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 22:59:50 +0000 |
commit | 4402b7cf8f56aa6e62a13dd1997b570e7331b72e (patch) | |
tree | fa68aa51981c263fd3ee66e816fd600322b35b19 /components/net/fetch | |
parent | 0d38d6239a4356928c2a7ec0a3cd53ecc32096b0 (diff) | |
download | servo-4402b7cf8f56aa6e62a13dd1997b570e7331b72e.tar.gz servo-4402b7cf8f56aa6e62a13dd1997b570e7331b72e.zip |
libservo: Remove a couple `EmbedderMethods` (#36276)
- Remove `EmbedderMethods::get_user_agent_string`. This is now part of
the `Preferences` data structure, which should allow it to be
per-`WebView` in the future.
- Remove `EmbedderMethods::get_version_string`. This was used to include
some data along with WebRender captures about the Servo version. This
isn't really necessary and it was done to replace code in the past
that output the WebRender version, so also isn't what the original
code did. I think we can just remove this entirely.
The idea with these changes is that `EmbedderMethods` can be removed
in a followup and the rest of the methods can be added to
`ServoDelegate`. These two methods are ones that cannot be added to a
delegate as they are used during `Servo` initialization.
Testing: There is currently no testing for libservo. These changes are
meant
as preparation for adding a suite of `WebView` unit tests.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/net/fetch')
-rw-r--r-- | components/net/fetch/methods.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs index 3286d1caad3..8c5758830c1 100644 --- a/components/net/fetch/methods.rs +++ b/components/net/fetch/methods.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use std::borrow::Cow; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Arc, Mutex}; use std::{io, mem, str}; @@ -61,7 +60,7 @@ pub enum Data { pub struct FetchContext { pub state: Arc<HttpState>, - pub user_agent: Cow<'static, str>, + pub user_agent: String, pub devtools_chan: Option<Arc<Mutex<Sender<DevtoolsControlMsg>>>>, pub filemanager: Arc<Mutex<FileManager>>, pub file_token: FileTokenCheck, |