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

Unified Diff: trunk/src/chrome/browser/geolocation/geolocation_infobar_delegate.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/geolocation/geolocation_infobar_delegate.cc
===================================================================
--- trunk/src/chrome/browser/geolocation/geolocation_infobar_delegate.cc (revision 238401)
+++ trunk/src/chrome/browser/geolocation/geolocation_infobar_delegate.cc (working copy)
@@ -7,7 +7,6 @@
#include "base/metrics/histogram.h"
#include "chrome/browser/content_settings/permission_queue_controller.h"
#include "chrome/browser/google/google_util.h"
-#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
@@ -62,7 +61,7 @@
} // namespace
// static
-InfoBar* GeolocationInfoBarDelegate::Create(
+InfoBarDelegate* GeolocationInfoBarDelegate::Create(
InfoBarService* infobar_service,
PermissionQueueController* controller,
const PermissionRequestID& id,
@@ -71,20 +70,20 @@
RecordUmaEvent(GEOLOCATION_INFO_BAR_DELEGATE_EVENT_CREATE);
const content::NavigationEntry* committed_entry =
infobar_service->web_contents()->GetController().GetLastCommittedEntry();
- return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new DelegateType(
- controller, id, requesting_frame,
- committed_entry ? committed_entry->GetUniqueID() : 0,
- display_languages))));
+ return infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ new DelegateType(infobar_service, controller, id, requesting_frame,
+ committed_entry ? committed_entry->GetUniqueID() : 0,
+ display_languages)));
}
GeolocationInfoBarDelegate::GeolocationInfoBarDelegate(
+ InfoBarService* infobar_service,
PermissionQueueController* controller,
const PermissionRequestID& id,
const GURL& requesting_frame,
int contents_unique_id,
const std::string& display_languages)
- : ConfirmInfoBarDelegate(),
+ : ConfirmInfoBarDelegate(infobar_service),
controller_(controller),
id_(id),
requesting_frame_(requesting_frame.GetOrigin()),

Powered by Google App Engine
This is Rietveld 408576698