Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1301)

Unified Diff: chrome/browser/infobars/infobar_service.h

Issue 553333006: Makes InfoBarService not close infobars on a reload from browser instant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix race Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/infobars/infobar_service.h
diff --git a/chrome/browser/infobars/infobar_service.h b/chrome/browser/infobars/infobar_service.h
index d502b58f1905d6ec36c0ee065a2e00325954876a..d2e43365f2492e666bb9cc2dbe4a62f9bec5963e 100644
--- a/chrome/browser/infobars/infobar_service.h
+++ b/chrome/browser/infobars/infobar_service.h
@@ -37,6 +37,11 @@ class InfoBarService : public infobars::InfoBarManager,
static content::WebContents* WebContentsFromInfoBar(
infobars::InfoBar* infobar);
+ // Makes it so the next reload is ignored. That is, if the next commit is a
+ // reload than it is treated as if nothing happened and no infobars are
Peter Kasting 2014/09/18 17:48:04 Nit: than -> then
sky 2014/09/18 19:22:27 Done.
+ // attempted to be closed.
Peter Kasting 2014/09/18 17:48:04 Nit: Remove "attempted to be" Consider adding a m
sky 2014/09/18 19:22:27 Done.
+ void set_ignore_next_reload() { ignore_next_reload_ = true; }
+
private:
friend class content::WebContentsUserData<InfoBarService>;
@@ -53,6 +58,9 @@ class InfoBarService : public infobars::InfoBarManager,
// content::WebContentsObserver:
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
+ virtual void DidStartNavigationToPendingEntry(
+ const GURL& url,
+ content::NavigationController::ReloadType reload_type) OVERRIDE;
virtual void NavigationEntryCommitted(
const content::LoadCommittedDetails& load_details) OVERRIDE;
virtual void WebContentsDestroyed() OVERRIDE;
@@ -62,6 +70,8 @@ class InfoBarService : public infobars::InfoBarManager,
void OnDidBlockDisplayingInsecureContent();
void OnDidBlockRunningInsecureContent();
+ // See description in set_ignore_next_reload().
+ bool ignore_next_reload_;
DISALLOW_COPY_AND_ASSIGN(InfoBarService);
};
« no previous file with comments | « no previous file | chrome/browser/infobars/infobar_service.cc » ('j') | chrome/browser/infobars/infobar_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698