- Electron version: 1.4.3
- Operating system:  @win7
- description:

working on a download app with electron and angular. 
By using webContents.downloadUrl, webContents.session.on('will-download', handler) I can make download function work well, however, I could not find a api to save download progress before closing electron app so that I can restore download when this app is started next time.

Excepted Result:
1. user click 'download' button to download a 1G file.
2. after 500M is downloaded, user quit the app
3. one hour later, user open this app again, and downloading can automatically be restored

atom/browser/api/atom_api_session.cc
const scoped_refptr<net::URLRequestContextGetter>& context_getter,
    const base::Closure& callback) {
  auto request_context = context_getter->GetURLRequestContext();
  auto cache = request_context->host_resolver()->GetHostCache();
  if (cache) {
    cache->clear();
    DCHECK_EQ(0u, cache->size());
    if (!callback.is_null())
      RunCallbackInUI(callback);
  }
}
void AllowNTLMCredentialsForDomainsInIO(
    const scoped_refptr<net::URLRequestContextGetter>& context_getter,
    const std::string& domains) {
  auto request_context = context_getter->GetURLRequestContext();
  auto auth_handler = request_context->http_auth_handler_factory();
  if (auth_handler) {
    auto auth_preferences = const_cast<net::HttpAuthPreferences*>(
        auth_handler->http_auth_preferences());
    if (auth_preferences)
      auth_preferences->set_server_whitelist(domains);
  }
}
void OnClearStorageDataDone(const base::Closure& callback) {