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

Unified Diff: chrome/browser/chrome_quota_permission_context.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/chrome_quota_permission_context.cc
diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc
index de73bd3cbbb2f4481db3aed604b59fb6f95f32e6..0de3b2b12d3ae3130d61b60f306ef406eac5f339 100644
--- a/chrome/browser/chrome_quota_permission_context.cc
+++ b/chrome/browser/chrome_quota_permission_context.cc
@@ -15,10 +15,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/ui/website_settings/permission_bubble_request.h"
-#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/locale_settings.h"
-#include "components/prefs/pref_service.h"
#include "components/url_formatter/elide_url.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_details.h"
@@ -50,7 +48,6 @@ class QuotaPermissionRequest : public PermissionBubbleRequest {
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64_t requested_quota,
- const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback);
~QuotaPermissionRequest() override;
@@ -68,7 +65,6 @@ class QuotaPermissionRequest : public PermissionBubbleRequest {
private:
scoped_refptr<ChromeQuotaPermissionContext> context_;
GURL origin_url_;
- std::string display_languages_;
int64_t requested_quota_;
content::QuotaPermissionContext::PermissionCallback callback_;
@@ -79,11 +75,9 @@ QuotaPermissionRequest::QuotaPermissionRequest(
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64_t requested_quota,
- const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback)
: context_(context),
origin_url_(origin_url),
- display_languages_(display_languages),
requested_quota_(requested_quota),
callback_(callback) {}
@@ -99,8 +93,7 @@ base::string16 QuotaPermissionRequest::GetMessageText() const {
(requested_quota_ > kRequestLargeQuotaThreshold
? IDS_REQUEST_LARGE_QUOTA_INFOBAR_QUESTION
: IDS_REQUEST_QUOTA_INFOBAR_QUESTION),
- url_formatter::FormatUrlForSecurityDisplay(origin_url_,
- display_languages_));
+ url_formatter::FormatUrlForSecurityDisplay(origin_url_));
}
base::string16 QuotaPermissionRequest::GetMessageTextFragment() const {
@@ -150,7 +143,6 @@ class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate {
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64_t requested_quota,
- const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback);
private:
@@ -158,7 +150,6 @@ class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate {
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64_t requested_quota,
- const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback);
~RequestQuotaInfoBarDelegate() override;
@@ -170,7 +161,6 @@ class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate {
scoped_refptr<ChromeQuotaPermissionContext> context_;
GURL origin_url_;
- std::string display_languages_;
int64_t requested_quota_;
content::QuotaPermissionContext::PermissionCallback callback_;
@@ -183,23 +173,20 @@ void RequestQuotaInfoBarDelegate::Create(
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64_t requested_quota,
- const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback) {
infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new RequestQuotaInfoBarDelegate(
- context, origin_url, requested_quota, display_languages, callback))));
+ context, origin_url, requested_quota, callback))));
}
RequestQuotaInfoBarDelegate::RequestQuotaInfoBarDelegate(
ChromeQuotaPermissionContext* context,
const GURL& origin_url,
int64_t requested_quota,
- const std::string& display_languages,
const content::QuotaPermissionContext::PermissionCallback& callback)
: ConfirmInfoBarDelegate(),
context_(context),
origin_url_(origin_url),
- display_languages_(display_languages),
requested_quota_(requested_quota),
callback_(callback) {}
@@ -223,8 +210,7 @@ base::string16 RequestQuotaInfoBarDelegate::GetMessageText() const {
(requested_quota_ > kRequestLargeQuotaThreshold
? IDS_REQUEST_LARGE_QUOTA_INFOBAR_QUESTION
: IDS_REQUEST_QUOTA_INFOBAR_QUESTION),
- url_formatter::FormatUrlForSecurityDisplay(origin_url_,
- display_languages_));
+ url_formatter::FormatUrlForSecurityDisplay(origin_url_));
}
bool RequestQuotaInfoBarDelegate::Accept() {
@@ -286,8 +272,6 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
if (infobar_service) {
RequestQuotaInfoBarDelegate::Create(
infobar_service, this, params.origin_url, params.requested_size,
- Profile::FromBrowserContext(web_contents->GetBrowserContext())->
- GetPrefs()->GetString(prefs::kAcceptLanguages),
callback);
return;
}
@@ -296,11 +280,7 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
PermissionBubbleManager::FromWebContents(web_contents);
if (bubble_manager) {
bubble_manager->AddRequest(new QuotaPermissionRequest(
- this, params.origin_url, params.requested_size,
- Profile::FromBrowserContext(web_contents->GetBrowserContext())
- ->GetPrefs()
- ->GetString(prefs::kAcceptLanguages),
- callback));
+ this, params.origin_url, params.requested_size, callback));
return;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698