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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context_unittest.cc

Issue 7006010: Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/tab_contents/infobar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/geolocation_permission_context_unittest.cc
===================================================================
--- chrome/browser/geolocation/geolocation_permission_context_unittest.cc (revision 87541)
+++ chrome/browser/geolocation/geolocation_permission_context_unittest.cc (working copy)
@@ -51,7 +51,7 @@
: TabContentsWrapper(
new TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL)),
removed_infobar_delegate_(NULL) {
- Source<TabContents> source(tab_contents());
+ Source<TabContentsWrapper> source(this);
registrar_.Add(this, NotificationType::TAB_CONTENTS_INFOBAR_REMOVED,
source);
}
@@ -63,10 +63,12 @@
NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type.value == NotificationType::TAB_CONTENTS_INFOBAR_REMOVED)
- removed_infobar_delegate_ = Details<InfoBarDelegate>(details).ptr();
- else
+ if (type.value == NotificationType::TAB_CONTENTS_INFOBAR_REMOVED) {
+ removed_infobar_delegate_ =
+ Details<std::pair<InfoBarDelegate*, bool> >(details)->first;
+ } else {
TabContentsWrapper::Observe(type, source, details);
+ }
}
} // namespace
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/tab_contents/infobar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698