summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-01 16:48:17 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-01 16:48:17 +0000
commitaa1834c788f85aef89c3e39cf8258e8d2ad42281 (patch)
treeb26d28cfc982f0069fee45d4d8df4e60e519872e /chrome/browser/notifications
parent25af8b0f78aa52c2484e71ae3c8ce36cf1a72051 (diff)
downloadchromium_src-aa1834c788f85aef89c3e39cf8258e8d2ad42281.zip
chromium_src-aa1834c788f85aef89c3e39cf8258e8d2ad42281.tar.gz
chromium_src-aa1834c788f85aef89c3e39cf8258e8d2ad42281.tar.bz2
Revert 99187 (speculative revert for ProfileSyncServiceSessionTest.FailModelAssociation on 10.5)
- Move infobar handling to a tab helper, part 1. BUG=94741 TEST=no visible change Review URL: http://codereview.chromium.org/7810002 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/7827017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99198 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index 89e7d38..bd46686 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/content_settings/content_settings_provider.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_object_proxy.h"
@@ -338,6 +337,9 @@ void DesktopNotificationService::RequestPermission(
if (!tab)
return;
+ TabContentsWrapper* wrapper =
+ TabContentsWrapper::GetCurrentWrapperForContents(tab);
+
// If |origin| hasn't been seen before and the default content setting for
// notifications is "ask", show an infobar.
// The cache can only answer queries on the IO thread once it's initialized,
@@ -345,9 +347,7 @@ void DesktopNotificationService::RequestPermission(
ContentSetting setting = GetContentSetting(origin);
if (setting == CONTENT_SETTING_ASK) {
// Show an info bar requesting permission.
- TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab);
- wrapper->infobar_tab_helper()->AddInfoBar(
+ wrapper->AddInfoBar(
new NotificationPermissionInfoBarDelegate(
tab, origin, DisplayNameForOrigin(origin), process_id,
route_id, callback_context));