From: Robo Date: Fri, 13 Nov 2015 20:55:23 +0000 (+0530) Subject: browser: fix reloadignoringcache api X-Git-Tag: v0.35.1~32^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2a7f874373c44d1606cbabe2c921763732fca87c;p=electron.git browser: fix reloadignoringcache api --- diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 601a4ba6..1c3334e9 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -658,10 +658,6 @@ void WebContents::Stop() { web_contents()->Stop(); } -void WebContents::ReloadIgnoringCache() { - web_contents()->GetController().ReloadIgnoringCache(false); -} - void WebContents::GoBack() { atom::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); web_contents()->GetController().GoBack(); @@ -1009,7 +1005,6 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder( .SetMethod("isLoading", &WebContents::IsLoading) .SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse) .SetMethod("_stop", &WebContents::Stop) - .SetMethod("_reloadIgnoringCache", &WebContents::ReloadIgnoringCache) .SetMethod("_goBack", &WebContents::GoBack) .SetMethod("_goForward", &WebContents::GoForward) .SetMethod("_goToOffset", &WebContents::GoToOffset) diff --git a/atom/browser/api/lib/navigation-controller.coffee b/atom/browser/api/lib/navigation-controller.coffee index 7d276e57..d0c539a9 100644 --- a/atom/browser/api/lib/navigation-controller.coffee +++ b/atom/browser/api/lib/navigation-controller.coffee @@ -62,8 +62,8 @@ class NavigationController @webContents._loadURL @getURL(), {} reloadIgnoringCache: -> - @webContents._reloadIgnoringCache() # Rely on WebContents to clear cache. - @reload() + @pendingIndex = @currentIndex + @webContents._loadURL @getURL(), {extraHeaders: "pragma: no-cache\n"} canGoBack: -> @getActiveIndex() > 0