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

Unified Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc

Issue 7046080: When replacing an infobar, maintain the old infobar's position. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 6 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/tab_contents/tab_contents_wrapper.cc
===================================================================
--- chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (revision 88583)
+++ chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (working copy)
@@ -515,14 +515,10 @@
Source<TabContentsWrapper>(this),
Details<ReplaceDetails>(&replace_details));
- // Remove the old one.
- infobar_delegates_.erase(it);
-
- // Add the new one.
DCHECK(find(infobar_delegates_.begin(),
infobar_delegates_.end(), new_delegate) ==
infobar_delegates_.end());
- infobar_delegates_.push_back(new_delegate);
+ infobar_delegates_.erase(infobar_delegates_.insert(it, new_delegate) + 1);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/tab_contents/infobar_container.cc ('k') | chrome/browser/ui/views/infobars/infobar_container_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698