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

Unified Diff: chrome/browser/chrome_quota_permission_context.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/chrome_quota_permission_context.cc
===================================================================
--- chrome/browser/chrome_quota_permission_context.cc (revision 238220)
+++ chrome/browser/chrome_quota_permission_context.cc (working copy)
@@ -10,6 +10,7 @@
#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"
@@ -32,7 +33,8 @@
class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // Creates a request quota infobar delegate and adds it to |infobar_service|.
+ // Creates a request quota infobar and delegate and adds the infobar to
+ // |infobar_service|.
static void Create(
InfoBarService* infobar_service,
ChromeQuotaPermissionContext* context,
@@ -43,7 +45,6 @@
private:
RequestQuotaInfoBarDelegate(
- InfoBarService* infobar_service,
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64 requested_quota,
@@ -75,20 +76,18 @@
int64 requested_quota,
const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback) {
- infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
- new RequestQuotaInfoBarDelegate(infobar_service, context, origin_url,
- requested_quota, display_languages,
- callback)));
+ infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(new RequestQuotaInfoBarDelegate(
+ 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(infobar_service),
+ : ConfirmInfoBarDelegate(),
context_(context),
origin_url_(origin_url),
display_languages_(display_languages),

Powered by Google App Engine
This is Rietveld 408576698