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

Unified Diff: chrome/browser/managed_mode/managed_mode_navigation_observer.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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: chrome/browser/managed_mode/managed_mode_navigation_observer.cc
===================================================================
--- chrome/browser/managed_mode/managed_mode_navigation_observer.cc (revision 238220)
+++ chrome/browser/managed_mode/managed_mode_navigation_observer.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
+#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/managed_mode/managed_mode_interstitial.h"
#include "chrome/browser/managed_mode/managed_mode_resource_throttle.h"
@@ -80,12 +81,12 @@
class ManagedModeWarningInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // Creates a managed mode warning infobar delegate and adds it to
- // |infobar_service|. Returns the delegate if it was successfully added.
- static InfoBarDelegate* Create(InfoBarService* infobar_service);
+ // Creates a managed mode warning infobar and delegate and adds the infobar to
+ // |infobar_service|. Returns the infobar if it was successfully added.
+ static InfoBar* Create(InfoBarService* infobar_service);
private:
- explicit ManagedModeWarningInfoBarDelegate(InfoBarService* infobar_service);
+ ManagedModeWarningInfoBarDelegate();
virtual ~ManagedModeWarningInfoBarDelegate();
// ConfirmInfoBarDelegate:
@@ -101,15 +102,15 @@
};
// static
-InfoBarDelegate* ManagedModeWarningInfoBarDelegate::Create(
+InfoBar* ManagedModeWarningInfoBarDelegate::Create(
InfoBarService* infobar_service) {
- return infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
- new ManagedModeWarningInfoBarDelegate(infobar_service)));
+ return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(
+ new ManagedModeWarningInfoBarDelegate())));
}
-ManagedModeWarningInfoBarDelegate::ManagedModeWarningInfoBarDelegate(
- InfoBarService* infobar_service)
- : ConfirmInfoBarDelegate(infobar_service) {
+ManagedModeWarningInfoBarDelegate::ManagedModeWarningInfoBarDelegate()
+ : ConfirmInfoBarDelegate() {
}
ManagedModeWarningInfoBarDelegate::~ManagedModeWarningInfoBarDelegate() {
« no previous file with comments | « chrome/browser/managed_mode/managed_mode_navigation_observer.h ('k') | chrome/browser/media/media_stream_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698