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

Unified Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 1575623002: Disable Web Notifications in Incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permfix
Patch Set: No Profile* in WebsiteSettingsPopupView Created 4 years, 11 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/ui/views/website_settings/website_settings_popup_view.cc
diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
index fd8a3717a276ec062a39751e35062036508edb64..65fd94fe15262c14c23bf727ab1fcac30666cfd0 100644
--- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
+++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
@@ -590,6 +590,9 @@ void WebsiteSettingsPopupView::SetCookieInfo(
WebsiteSettingsUI::PermissionInfo info;
info.type = CONTENT_SETTINGS_TYPE_COOKIES;
info.setting = CONTENT_SETTING_ALLOW;
+ info.is_incognito =
+ Profile::FromBrowserContext(web_contents_->GetBrowserContext())
palmer 2016/01/14 19:26:19 I *think* it is possible for this to return nullpt
johnme 2016/01/14 23:34:48 web_contents_ is guaranteed to be non-null (despit
+ ->IsOffTheRecord();
views::ImageView* icon = new views::ImageView();
const gfx::Image& image = WebsiteSettingsUI::GetPermissionIcon(info);
icon->SetImage(image.ToImageSkia());

Powered by Google App Engine
This is Rietveld 408576698