Add unit testing to file manager; Replace uuid by stringified version in FileManagerThreadMsg

This commit is contained in:
Zhen Zhang 2016-06-02 15:08:44 +08:00
parent 3977128d7e
commit f8fa9aaf42
7 changed files with 100 additions and 73 deletions

View file

@ -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 http://mozilla.org/MPL/2.0/. */
use ipc_channel::ipc::IpcSender;
use std::str::FromStr;
use url::Url;
use uuid::Uuid;
@ -29,13 +28,6 @@ pub struct BlobURLStoreEntry {
pub bytes: Vec<u8>,
}
/// Message-passing style interface between store and loader
#[derive(Serialize, Deserialize)]
pub enum BlobURLStoreMsg {
/// Request for an blob entry identified by uuid
Request(Uuid, IpcSender<Result<BlobURLStoreEntry, BlobURLStoreError>>),
}
/// Parse URL as Blob URL scheme's definition
/// https://w3c.github.io/FileAPI/#DefinitionOfScheme
pub fn parse_blob_url(url: &Url) -> Option<(Uuid, Option<&str>)> {