Skip to content

Commit 977115b

Browse files
authored
stub methods in chrome plugin and use native tls (#230)
* stub methods in chrome plugin and use native tls * fix lint
1 parent deb8483 commit 977115b

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ features = ["sqlite"]
4747

4848
[dependencies.reqwest]
4949
version = "0.13.4"
50-
features = ["gzip", "json"]
50+
default-features = false
51+
features = ["gzip", "json", "native-tls"]
5152

5253
[features]
5354
pym = ["pyo3"]

src/plugins/chrome.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,15 @@ fn encryption_key() -> Result<Vec<u8>> {
180180
// Windows users should set `csrf`/`session` in the config manually.
181181
Err(Error::ChromeNotLogin)
182182
}
183+
184+
// for headless installations stub functions are defined
185+
// can add to stubs with cfg(any(...))
186+
#[cfg(target_os = "android")]
187+
fn cookie_db_path() -> Option<PathBuf> {
188+
None
189+
}
190+
191+
#[cfg(target_os = "android")]
192+
fn encryption_key() -> Result<Vec<u8>> {
193+
Err(Error::ChromeNotLogin)
194+
}

0 commit comments

Comments
 (0)