aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/image_cache_thread.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-10-11 18:15:20 +0200
committerMs2ger <Ms2ger@gmail.com>2016-11-02 16:15:25 +0100
commit634a3989ad53d875997ba2e3f5d4550009ea0415 (patch)
tree22ca3a4a06f2ff1536ad2a49703ca66788d2677b /components/net/image_cache_thread.rs
parent4bbeecb99f0d2fa38ee719913c13b433713dcd2a (diff)
downloadservo-634a3989ad53d875997ba2e3f5d4550009ea0415.tar.gz
servo-634a3989ad53d875997ba2e3f5d4550009ea0415.zip
Move ResponseAction to the image cache.
Diffstat (limited to 'components/net/image_cache_thread.rs')
-rw-r--r--components/net/image_cache_thread.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/components/net/image_cache_thread.rs b/components/net/image_cache_thread.rs
index 2fa8401990e..440ebd32100 100644
--- a/components/net/image_cache_thread.rs
+++ b/components/net/image_cache_thread.rs
@@ -5,7 +5,7 @@
use immeta::load_from_buf;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
-use net_traits::{CoreResourceThread, NetworkError, ResponseAction, fetch_async, FetchResponseMsg, FetchMetadata};
+use net_traits::{CoreResourceThread, NetworkError, fetch_async, FetchResponseMsg, FetchMetadata, Metadata};
use net_traits::image::base::{Image, ImageMetadata, PixelFormat, load_from_memory};
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheCommand, ImageCacheThread, ImageState};
use net_traits::image_cache_thread::{ImageCacheResult, ImageOrMetadataAvailable, ImageResponse, UsePlaceholder};
@@ -225,6 +225,15 @@ impl ImageListener {
}
}
+/// A legacy type that's mostly redundant with FetchResponseMsg.
+// FIXME(#13717): remove this type.
+#[derive(Deserialize, Serialize)]
+enum ResponseAction {
+ HeadersAvailable(Result<Metadata, NetworkError>),
+ DataAvailable(Vec<u8>),
+ ResponseComplete(Result<(), NetworkError>)
+}
+
struct ResourceLoadInfo {
action: ResponseAction,
key: LoadKey,