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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

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/ui/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index 2a5f283c771182b0b1b5d1622e15e6bc80d15413..d2e48ff9cf6d98ec7225acbdcf735a4aaae2e6bf 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/browser_instant_controller.h"
#include "base/bind.h"
+#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/instant_service.h"
#include "chrome/browser/search/instant_service_factory.h"
@@ -160,6 +161,12 @@ void BrowserInstantController::DefaultSearchProviderChanged() {
// renderer.
if (!instant_service->IsInstantProcess(rph->GetID()))
continue;
+
contents->GetController().Reload(false);
Peter Kasting 2014/09/18 17:48:04 Nit: Maybe add a comment about whether the order o
sky 2014/09/18 19:22:27 Done.
+
+ InfoBarService* info_bar_service =
Peter Kasting 2014/09/18 17:48:05 Nit: Consider adding a comment here about why we w
sky 2014/09/18 19:22:27 Done.
+ InfoBarService::FromWebContents(contents);
Peter Kasting 2014/09/18 17:48:05 Can this actually be NULL? If so add a comment ab
sky 2014/09/18 19:22:27 You're right, it can't. Nuked.
+ if (info_bar_service)
+ info_bar_service->set_ignore_next_reload();
}
}
« chrome/browser/infobars/infobar_service.cc ('K') | « chrome/browser/infobars/infobar_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698