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

Unified Diff: components/infobars/core/simple_alert_infobar_delegate.cc

Issue 824033002: Componentize SimpleAlertInfoBarDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: components/infobars/core/simple_alert_infobar_delegate.cc
diff --git a/chrome/browser/infobars/simple_alert_infobar_delegate.cc b/components/infobars/core/simple_alert_infobar_delegate.cc
similarity index 70%
rename from chrome/browser/infobars/simple_alert_infobar_delegate.cc
rename to components/infobars/core/simple_alert_infobar_delegate.cc
index 02b71b0c49cfb69db1f3304e306cb9bb38cd2a3c..9262d05e54cb1c5535d8309e204b9bb5278f0929 100644
--- a/chrome/browser/infobars/simple_alert_infobar_delegate.cc
+++ b/components/infobars/core/simple_alert_infobar_delegate.cc
@@ -2,19 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/infobars/simple_alert_infobar_delegate.h"
+#include "components/infobars/core/simple_alert_infobar_delegate.h"
-#include "chrome/browser/infobars/infobar_service.h"
#include "components/infobars/core/infobar.h"
+#include "components/infobars/core/infobar_manager.h"
#include "third_party/skia/include/core/SkBitmap.h"
// static
-void SimpleAlertInfoBarDelegate::Create(InfoBarService* infobar_service,
- int icon_id,
- const base::string16& message,
- bool auto_expire) {
- infobar_service->AddInfoBar(
- infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
+void SimpleAlertInfoBarDelegate::Create(
+ infobars::InfoBarManager* infobar_manager,
+ int icon_id,
+ const base::string16& message,
+ bool auto_expire) {
+ infobar_manager->AddInfoBar(
+ infobar_manager->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
new SimpleAlertInfoBarDelegate(icon_id, message, auto_expire))));
}

Powered by Google App Engine
This is Rietveld 408576698