- Electron version: 1.2.4 (May Be All Version has the issue)
- Operating system: MAC OS X 10.10.5 (May Be All OS)

i set the `DownloadItem.setSavePath` but if the target resource return 404 status from server, then the save dialog prompt.
### Steps to reproduce

Merged in from #6957
1. Disconnect from the network
2. initiate a download using mainWindow.webContents.downloadURL(url);
3. call item.setSavePath(path) in the will-download handler

Result:
The browser will show a save dialog.

Expected result:
No save dialog, just an updated or done callback on the item

It appears that the code that notices a save path has been set and prevents the dialog from coming up doesn't happen when the download fails.

atom/browser/atom_download_manager_delegate.cc
window = relay->window.get();
  base::FilePath path;
  if (file_dialog::ShowSaveDialog(window, item->GetURL().spec(),
                                  "", default_path,
                                  file_dialog::Filters(), &path)) {
    
    AtomBrowserContext* browser_context = static_cast<AtomBrowserContext*>(
        download_manager_->GetBrowserContext());
    browser_context->prefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
                                          path.DirName());
    v8::Isolate* isolate = v8::Isolate::GetCurrent();
    v8::Locker locker(isolate);
    v8::HandleScope handle_scope(isolate);
    api::DownloadItem* download_item = api::DownloadItem::FromWrappedClass(
        isolate, item);
    if (download_item)
      download_item->SetSavePath(path);
  }
  
  
  
  callback.Run(path,
               content::DownloadItem::TARGET_DISPOSITION_PROMPT,
               content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, path);
}
void AtomDownloadManagerDelegate::Shutdown() {
  weak_ptr_factory_.InvalidateWeakPtrs();
  download_manager_ = nullptr;
}
bool AtomDownloadManagerDelegate::DetermineDownloadTarget(