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

Unified Diff: trunk/src/chrome/browser/chrome_quota_permission_context.cc

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
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: trunk/src/chrome/browser/chrome_quota_permission_context.cc
===================================================================
--- trunk/src/chrome/browser/chrome_quota_permission_context.cc (revision 238401)
+++ trunk/src/chrome/browser/chrome_quota_permission_context.cc (working copy)
@@ -10,7 +10,6 @@
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.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/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_util.h"
@@ -33,8 +32,7 @@
class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // Creates a request quota infobar and delegate and adds the infobar to
- // |infobar_service|.
+ // Creates a request quota infobar delegate and adds it to |infobar_service|.
static void Create(
InfoBarService* infobar_service,
ChromeQuotaPermissionContext* context,
@@ -45,6 +43,7 @@
private:
RequestQuotaInfoBarDelegate(
+ InfoBarService* infobar_service,
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64 requested_quota,
@@ -76,18 +75,20 @@
int64 requested_quota,
const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback) {
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new RequestQuotaInfoBarDelegate(
- context, origin_url, requested_quota, display_languages, callback))));
+ infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ new RequestQuotaInfoBarDelegate(infobar_service, context, origin_url,
+ requested_quota, display_languages,
+ callback)));
}
RequestQuotaInfoBarDelegate::RequestQuotaInfoBarDelegate(
+ InfoBarService* infobar_service,
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64 requested_quota,
const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback)
- : ConfirmInfoBarDelegate(),
+ : ConfirmInfoBarDelegate(infobar_service),
context_(context),
origin_url_(origin_url),
display_languages_(display_languages),

Powered by Google App Engine
This is Rietveld 408576698