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

Unified Diff: chrome/browser/permissions/permission_queue_controller.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 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/permissions/permission_queue_controller.cc
diff --git a/chrome/browser/permissions/permission_queue_controller.cc b/chrome/browser/permissions/permission_queue_controller.cc
index 4e62dce86d4d5ea3487b5b0d562e91d400d34526..76e1a6d2ac7f02bb81a1d5c91eab75b4118e83f4 100644
--- a/chrome/browser/permissions/permission_queue_controller.cc
+++ b/chrome/browser/permissions/permission_queue_controller.cc
@@ -15,11 +15,9 @@
#include "chrome/browser/permissions/permission_uma_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_util.h"
-#include "chrome/common/pref_names.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/infobars/core/infobar.h"
-#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -66,8 +64,7 @@ class PermissionQueueController::PendingInfobarRequest {
infobars::InfoBar* infobar() { return infobar_; }
void RunCallback(ContentSetting content_setting);
- void CreateInfoBar(PermissionQueueController* controller,
- const std::string& display_languages);
+ void CreateInfoBar(PermissionQueueController* controller);
private:
content::PermissionType type_;
@@ -108,8 +105,7 @@ void PermissionQueueController::PendingInfobarRequest::RunCallback(
}
void PermissionQueueController::PendingInfobarRequest::CreateInfoBar(
- PermissionQueueController* controller,
- const std::string& display_languages) {
+ PermissionQueueController* controller) {
// Controller can be Unretained because the lifetime of the infobar
// is tied to that of the queue controller. Before QueueController
// is destroyed, all requests will be cancelled and so all delegates
@@ -123,25 +119,21 @@ void PermissionQueueController::PendingInfobarRequest::CreateInfoBar(
switch (type_) {
case content::PermissionType::GEOLOCATION:
infobar_ = GeolocationInfoBarDelegateAndroid::Create(
- GetInfoBarService(id_), requesting_frame_, display_languages,
- callback);
+ GetInfoBarService(id_), requesting_frame_, callback);
break;
#if defined(ENABLE_NOTIFICATIONS)
case content::PermissionType::NOTIFICATIONS:
infobar_ = NotificationPermissionInfobarDelegate::Create(
- GetInfoBarService(id_), requesting_frame_,
- display_languages, callback);
+ GetInfoBarService(id_), requesting_frame_, callback);
break;
#endif // ENABLE_NOTIFICATIONS
case content::PermissionType::MIDI_SYSEX:
infobar_ = MidiPermissionInfoBarDelegateAndroid::Create(
- GetInfoBarService(id_), requesting_frame_, display_languages,
- callback);
+ GetInfoBarService(id_), requesting_frame_, callback);
break;
case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
infobar_ = ProtectedMediaIdentifierInfoBarDelegateAndroid::Create(
- GetInfoBarService(id_), requesting_frame_, display_languages,
- callback);
+ GetInfoBarService(id_), requesting_frame_, callback);
break;
default:
NOTREACHED();
@@ -335,8 +327,7 @@ void PermissionQueueController::ShowQueuedInfoBarForTab(
i != pending_infobar_requests_.end(); ++i) {
if (ArePermissionRequestsForSameTab(i->id(), id) && !i->has_infobar()) {
RegisterForInfoBarNotifications(infobar_service);
- i->CreateInfoBar(
- this, profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
+ i->CreateInfoBar(this);
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698