base::Time(), base::Time::Max(), callback);
}
+void Session::FlushStorageData() {
+ auto storage_partition =
+ content::BrowserContext::GetStoragePartition(browser_context(), nullptr);
+ storage_partition->Flush();
+}
+
void Session::SetProxy(const net::ProxyConfig& config,
const base::Closure& callback) {
auto getter = browser_context_->GetRequestContext();
.SetMethod("resolveProxy", &Session::ResolveProxy)
.SetMethod("clearCache", &Session::ClearCache)
.SetMethod("clearStorageData", &Session::ClearStorageData)
+ .SetMethod("flushStorageData", &Session::FlushStorageData)
.SetMethod("setProxy", &Session::SetProxy)
.SetMethod("setDownloadPath", &Session::SetDownloadPath)
.SetMethod("enableNetworkEmulation", &Session::EnableNetworkEmulation)
void ResolveProxy(const GURL& url, ResolveProxyCallback callback);
void ClearCache(const net::CompletionCallback& callback);
void ClearStorageData(mate::Arguments* args);
+ void FlushStorageData();
void SetProxy(const net::ProxyConfig& config, const base::Closure& callback);
void SetDownloadPath(const base::FilePath& path);
void EnableNetworkEmulation(const mate::Dictionary& options);
Clears the data of web storages.
+#### `ses.flushStorageData()`
+
+Writes any unwritten DOMStorage data to disk.
+
#### `ses.setProxy(config, callback)`
* `config` Object