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

Side by Side Diff: components/content_settings/core/browser/content_settings_registry.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/content_settings/core/browser/content_settings_registry.h" 5 #include "components/content_settings/core/browser/content_settings_registry.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 CONTENT_SETTING_ASK), 166 CONTENT_SETTING_ASK),
167 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE, 167 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE,
168 ContentSettingsInfo::INHERIT_IN_INCOGNITO); 168 ContentSettingsInfo::INHERIT_IN_INCOGNITO);
169 169
170 Register(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications", 170 Register(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications",
171 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, 171 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE,
172 WhitelistedSchemes(), 172 WhitelistedSchemes(),
173 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, 173 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
174 CONTENT_SETTING_ASK), 174 CONTENT_SETTING_ASK),
175 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, 175 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE,
176 // See also NotificationPermissionContext::DecidePermission which
177 // implements additional incognito exceptions.
176 ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW); 178 ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW);
177 179
178 Register(CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen", CONTENT_SETTING_ASK, 180 Register(CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen", CONTENT_SETTING_ASK,
179 WebsiteSettingsInfo::SYNCABLE, 181 WebsiteSettingsInfo::SYNCABLE,
180 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), 182 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme),
181 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_ASK), 183 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_ASK),
182 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE, 184 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE,
183 ContentSettingsInfo::INHERIT_IN_INCOGNITO); 185 ContentSettingsInfo::INHERIT_IN_INCOGNITO);
184 186
185 Register(CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock", CONTENT_SETTING_ASK, 187 Register(CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock", CONTENT_SETTING_ASK,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 website_settings_registry_->Register( 303 website_settings_registry_->Register(
302 type, name, std::move(default_value), sync_status, 304 type, name, std::move(default_value), sync_status,
303 WebsiteSettingsInfo::NOT_LOSSY, scoping_type); 305 WebsiteSettingsInfo::NOT_LOSSY, scoping_type);
304 DCHECK(!ContainsKey(content_settings_info_, type)); 306 DCHECK(!ContainsKey(content_settings_info_, type));
305 content_settings_info_[type] = make_scoped_ptr( 307 content_settings_info_[type] = make_scoped_ptr(
306 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, 308 new ContentSettingsInfo(website_settings_info, whitelisted_schemes,
307 valid_settings, incognito_behavior)); 309 valid_settings, incognito_behavior));
308 } 310 }
309 311
310 } // namespace content_settings 312 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698