mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
read cookie_jar, hsts_list, auth_cache, and local_data from file if profile_dir option is present
This commit is contained in:
parent
ec9e1fe7e6
commit
d9c32b273a
8 changed files with 60 additions and 81 deletions
|
@ -37,10 +37,14 @@ struct StorageManager {
|
|||
|
||||
impl StorageManager {
|
||||
fn new(port: IpcReceiver<StorageThreadMsg>) -> StorageManager {
|
||||
let mut local_data = HashMap::new();
|
||||
if let Some(ref profile_dir) = opts::get().profile_dir {
|
||||
resource_thread::read_json_from_file(&mut local_data, profile_dir, "local_data.json");
|
||||
}
|
||||
StorageManager {
|
||||
port: port,
|
||||
session_data: HashMap::new(),
|
||||
local_data: HashMap::new(),
|
||||
local_data: local_data,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue