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

Unified Diff: trunk/src/chrome/browser/google/google_url_tracker.cc

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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: trunk/src/chrome/browser/google/google_url_tracker.cc
===================================================================
--- trunk/src/chrome/browser/google/google_url_tracker.cc (revision 238401)
+++ trunk/src/chrome/browser/google/google_url_tracker.cc (working copy)
@@ -13,7 +13,6 @@
#include "chrome/browser/google/google_url_tracker_infobar_delegate.h"
#include "chrome/browser/google/google_url_tracker_navigation_helper.h"
#include "chrome/browser/google/google_util.h"
-#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
@@ -349,13 +348,12 @@
if (map_entry->has_infobar_delegate()) {
map_entry->infobar_delegate()->Update(search_url);
} else {
- InfoBar* infobar = infobar_creator_.Run(infobar_service, this, search_url);
- if (infobar) {
- map_entry->SetInfoBarDelegate(
- static_cast<GoogleURLTrackerInfoBarDelegate*>(infobar->delegate()));
- } else {
+ GoogleURLTrackerInfoBarDelegate* infobar =
+ infobar_creator_.Run(infobar_service, this, search_url);
+ if (infobar)
+ map_entry->SetInfoBarDelegate(infobar);
+ else
map_entry->Close(false);
- }
}
}

Powered by Google App Engine
This is Rietveld 408576698