diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 10:51:16 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 10:51:16 +0000 |
commit | 1ccb3568d81cf47adf6f062067c186fdf43dd56d (patch) | |
tree | b8200bd953cbc88db64a09cc8fb6f7eca7237088 /chrome/browser/tab_contents/navigation_controller.h | |
parent | 0f0acb414b3e4ad3febc85bc3e6364a8b206ab76 (diff) | |
download | chromium_src-1ccb3568d81cf47adf6f062067c186fdf43dd56d.zip chromium_src-1ccb3568d81cf47adf6f062067c186fdf43dd56d.tar.gz chromium_src-1ccb3568d81cf47adf6f062067c186fdf43dd56d.tar.bz2 |
linux: plumb shift-reload down into new shift-reload API
Currently Linux-only, but the Mac/Win bits should now be trivial.
While I was add it, I tweaked a NavigationController function
that took a bare boolean into an enum to make the call sites more
explicit about what they're doing.
(In most places I added new functions that call into a shared
backing function; this is so I don't need to change every single
caller of e.g. Reload() to pass through an extra flag that will
be the same for almost every caller.)
BUG=1906
TEST=visit astronomy picture of the day; hit reload, picture pops
up quickly; hit shift-reload, picture loads slowly
Review URL: http://codereview.chromium.org/594063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/navigation_controller.h')
-rw-r--r-- | chrome/browser/tab_contents/navigation_controller.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/navigation_controller.h b/chrome/browser/tab_contents/navigation_controller.h index 2aba4fe..810f8b9 100644 --- a/chrome/browser/tab_contents/navigation_controller.h +++ b/chrome/browser/tab_contents/navigation_controller.h @@ -133,6 +133,12 @@ class NavigationController { int count; }; + enum ReloadType { + NO_RELOAD, // Normal load. + RELOAD, // Normal (cache-validating) reload. + RELOAD_IGNORING_CACHE // Reload bypassing the cache, aka shift-reload. + }; + // --------------------------------------------------------------------------- NavigationController(TabContents* tab_contents, Profile* profile); @@ -286,6 +292,8 @@ class NavigationController { // entry has POST data the user is prompted to see if they really want to // reload the page. In nearly all cases pass in true. void Reload(bool check_for_repost); + // Like Reload(), but don't use caches (aka "shift-reload"). + void ReloadIgnoringCache(bool check_for_repost); // Removing of entries ------------------------------------------------------- @@ -431,8 +439,11 @@ class NavigationController { bool RendererDidNavigateAutoSubframe( const ViewHostMsg_FrameNavigate_Params& params); + // Helper function for code shared between Reload() and ReloadAll(). + void ReloadInternal(bool check_for_repost, ReloadType reload_type); + // Actually issues the navigation held in pending_entry. - void NavigateToPendingEntry(bool reload); + void NavigateToPendingEntry(ReloadType reload_type); // Allows the derived class to issue notifications that a load has been // committed. This will fill in the active entry to the details structure. |