From 3d3afbf1a7c0a1b890a5f34b65d7ca5ccc0e19dc Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Tue, 29 Mar 2011 19:59:21 +0000 Subject: Makes instant delay showing any page that doens't result in a 403. BUG=72573 TEST=see bug R=jcivelli@chromium.org Review URL: http://codereview.chromium.org/6683059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79729 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/instant/instant_controller.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'chrome/browser/instant/instant_controller.h') diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h index a023146..da47d11 100644 --- a/chrome/browser/instant/instant_controller.h +++ b/chrome/browser/instant/instant_controller.h @@ -173,7 +173,7 @@ class InstantController : public InstantLoaderDelegate { GURL GetCurrentURL(); // InstantLoaderDelegate - virtual void ShowInstantLoader(InstantLoader* loader) OVERRIDE; + virtual void InstantStatusChanged(InstantLoader* loader) OVERRIDE; virtual void SetSuggestedTextFor(InstantLoader* loader, const string16& text, InstantCompleteBehavior behavior) OVERRIDE; @@ -206,6 +206,14 @@ class InstantController : public InstantLoaderDelegate { // Invoked from the timer to process the last scheduled url. void ProcessScheduledUpdate(); + // Does the work of processing a change in the status (ready or + // http_status_ok) of a loader. + void ProcessInstantStatusChanged(InstantLoader* loader); + + // Callback when the |show_timer_| fires. Invokes + // |ProcessInstantStatusChanged| with the appropriate arguments. + void ShowTimerFired(); + // Updates InstantLoaderManager and its current InstantLoader. This is invoked // internally from Update. void UpdateLoader(const TemplateURL* template_url, @@ -275,6 +283,9 @@ class InstantController : public InstantLoaderDelegate { // Timer used to delay calls to |UpdateLoader|. base::OneShotTimer update_timer_; + // Timer used to delay showing loaders whose status isn't ok. + base::OneShotTimer show_timer_; + // Used by ScheduleForDestroy; see it for details. ScopedRunnableMethodFactory destroy_factory_; -- cgit v1.1