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

Unified Diff: chrome/browser/geolocation/geolocation_infobar_delegate.cc

Issue 1142153002: Simplify infobar expiry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android compile Created 5 years, 7 months 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/geolocation/geolocation_infobar_delegate.cc
diff --git a/chrome/browser/geolocation/geolocation_infobar_delegate.cc b/chrome/browser/geolocation/geolocation_infobar_delegate.cc
index b69acf0cab7d70baee6a3ee3179aa34b1921bf77..1b6eb2d002393bfda2738c488e6c65b218e2f714 100644
--- a/chrome/browser/geolocation/geolocation_infobar_delegate.cc
+++ b/chrome/browser/geolocation/geolocation_infobar_delegate.cc
@@ -4,18 +4,10 @@
#include "chrome/browser/geolocation/geolocation_infobar_delegate.h"
-#include "base/metrics/histogram.h"
-#include "chrome/browser/content_settings/permission_queue_controller.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/grit/generated_resources.h"
-#include "chrome/grit/locale_settings.h"
-#include "components/google/core/browser/google_util.h"
#include "components/infobars/core/infobar.h"
-#include "content/public/browser/navigation_details.h"
-#include "content/public/browser/navigation_entry.h"
-#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
-#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -28,22 +20,15 @@ infobars::InfoBar* GeolocationInfoBarDelegate::Create(
const PermissionRequestID& id,
const GURL& requesting_frame,
const std::string& display_languages) {
- const content::NavigationEntry* committed_entry =
- infobar_service->web_contents()->GetController().GetLastCommittedEntry();
- GeolocationInfoBarDelegate* const delegate = new GeolocationInfoBarDelegate(
- controller, id, requesting_frame,
- committed_entry ? committed_entry->GetUniqueID() : 0,
- display_languages);
-
return infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(delegate)));
+ scoped_ptr<ConfirmInfoBarDelegate>(new GeolocationInfoBarDelegate(
+ controller, id, requesting_frame, display_languages))));
}
GeolocationInfoBarDelegate::GeolocationInfoBarDelegate(
PermissionQueueController* controller,
const PermissionRequestID& id,
const GURL& requesting_frame,
- int contents_unique_id,
timvolodine 2015/05/20 11:44:01 wow looks like this was not used at all?..
Peter Kasting 2015/05/20 18:22:00 Correct :(
const std::string& display_languages)
: PermissionInfobarDelegate(controller, id, requesting_frame,
CONTENT_SETTINGS_TYPE_GEOLOCATION),
« no previous file with comments | « chrome/browser/geolocation/geolocation_infobar_delegate.h ('k') | chrome/browser/media/midi_permission_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698