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

Unified Diff: chrome/browser/ui/website_settings/permission_menu_model.cc

Issue 11571010: fixed the DCHECK and also corrected the website setting UI for media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Markus' comment and consolidated |web_content_|. Created 8 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
« no previous file with comments | « chrome/browser/ui/website_settings/permission_menu_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/permission_menu_model.cc
diff --git a/chrome/browser/ui/website_settings/permission_menu_model.cc b/chrome/browser/ui/website_settings/permission_menu_model.cc
index 74e94e246531b82d4c9db2f6d82a0e8eb988c8dc..1c7632ce90155346deb03fdb20b365a88a531005 100644
--- a/chrome/browser/ui/website_settings/permission_menu_model.cc
+++ b/chrome/browser/ui/website_settings/permission_menu_model.cc
@@ -9,11 +9,13 @@
PermissionMenuModel::PermissionMenuModel(
Delegate* delegate,
+ const GURL& url,
ContentSettingsType type,
ContentSetting default_setting,
ContentSetting current_setting)
: ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)),
- delegate_(delegate) {
+ delegate_(delegate),
+ site_url_(url) {
string16 label;
switch (default_setting) {
case CONTENT_SETTING_ALLOW:
@@ -33,8 +35,9 @@ PermissionMenuModel::PermissionMenuModel(
}
AddCheckItem(COMMAND_SET_TO_DEFAULT, label);
- // TODO(xians): Media should support COMMAND_SET_TO_ALLOW for https.
- if (type != CONTENT_SETTINGS_TYPE_MEDIASTREAM) {
+ // Media only support COMMAND_SET_TO_ALLOW for https.
+ if (type != CONTENT_SETTINGS_TYPE_MEDIASTREAM ||
+ url.SchemeIsSecure()) {
label = l10n_util::GetStringUTF16(
IDS_WEBSITE_SETTINGS_MENU_ITEM_ALLOW);
AddCheckItem(COMMAND_SET_TO_ALLOW, label);
« no previous file with comments | « chrome/browser/ui/website_settings/permission_menu_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698