diff options
Diffstat (limited to 'components/net_traits/blob_url_store.rs')
-rw-r--r-- | components/net_traits/blob_url_store.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/components/net_traits/blob_url_store.rs b/components/net_traits/blob_url_store.rs index 71d8c11b2de..34f609ab10e 100644 --- a/components/net_traits/blob_url_store.rs +++ b/components/net_traits/blob_url_store.rs @@ -2,6 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use ipc_channel::ipc::IpcSender; use std::str::FromStr; use url::Url; use uuid::Uuid; @@ -15,6 +16,16 @@ pub enum BlobURLStoreError { InvalidOrigin, } +#[derive(Serialize, Deserialize)] +pub enum BlobURLStoreMsg { + /// Add an entry and send back the associated uuid + /// XXX: Second field is an unicode-serialized Origin, it is a temporary workaround + /// and should not be trusted. See issue https://github.com/servo/servo/issues/11722 + AddEntry(BlobURLStoreEntry, String, IpcSender<Result<String, BlobURLStoreError>>), + /// Delete an entry by uuid + DeleteEntry(String), +} + /// Blob URL store entry, a packaged form of Blob DOM object #[derive(Clone, Serialize, Deserialize)] pub struct BlobURLStoreEntry { |