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

Unified Diff: chrome/browser/notifications/desktop_notification_infobar_delegate.cc

Issue 1142153002: Simplify infobar expiry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android compile Created 5 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
Index: chrome/browser/notifications/desktop_notification_infobar_delegate.cc
diff --git a/chrome/browser/notifications/desktop_notification_infobar_delegate.cc b/chrome/browser/notifications/desktop_notification_infobar_delegate.cc
index eb34214e61a1b2c33e0b702dc9c1a4d37f2ec15c..a08b9992d0266e754a8295233a726ffdd5b958e2 100644
--- a/chrome/browser/notifications/desktop_notification_infobar_delegate.cc
+++ b/chrome/browser/notifications/desktop_notification_infobar_delegate.cc
@@ -4,15 +4,9 @@
#include "chrome/browser/notifications/desktop_notification_infobar_delegate.h"
-#include "chrome/browser/content_settings/permission_queue_controller.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/grit/generated_resources.h"
-#include "chrome/grit/locale_settings.h"
-#include "components/content_settings/core/common/content_settings_types.h"
-#include "components/content_settings/core/common/permission_request_id.h"
#include "components/infobars/core/infobar.h"
-#include "content/public/browser/navigation_entry.h"
-#include "content/public/browser/web_contents.h"
#include "grit/theme_resources.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -24,20 +18,15 @@ infobars::InfoBar* DesktopNotificationInfoBarDelegate::Create(
const PermissionRequestID& id,
const GURL& requesting_frame,
const std::string& display_languages) {
- const content::NavigationEntry* committed_entry =
- infobar_service->web_contents()->GetController().GetLastCommittedEntry();
return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new DesktopNotificationInfoBarDelegate(
- controller, id, requesting_frame,
- committed_entry ? committed_entry->GetUniqueID() : 0,
- display_languages))));
+ controller, id, requesting_frame, display_languages))));
}
DesktopNotificationInfoBarDelegate::DesktopNotificationInfoBarDelegate(
PermissionQueueController* controller,
const PermissionRequestID& id,
const GURL& requesting_frame,
- int contents_unique_id,
const std::string& display_languages)
: PermissionInfobarDelegate(controller, id, requesting_frame,
CONTENT_SETTINGS_TYPE_NOTIFICATIONS),

Powered by Google App Engine
This is Rietveld 408576698