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

Unified Diff: components/content_settings/core/browser/content_settings_default_provider.cc

Issue 1605453003: Ensure content settings aren't persisted in the guest profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: components/content_settings/core/browser/content_settings_default_provider.cc
diff --git a/components/content_settings/core/browser/content_settings_default_provider.cc b/components/content_settings/core/browser/content_settings_default_provider.cc
index 8bae69fad05db85f228ff811c61b86bf42d8f9c0..9cd6eba3792e6eef889c0d338605e4c6ec316699 100644
--- a/components/content_settings/core/browser/content_settings_default_provider.cc
+++ b/components/content_settings/core/browser/content_settings_default_provider.cc
@@ -208,14 +208,15 @@ bool DefaultProvider::SetWebsiteSetting(
return false;
}
+ // Put |in_value| in a scoped pointer to ensure that it gets cleaned up
+ // properly if we don't pass on the ownership.
+ scoped_ptr<base::Value> value(in_value);
+
// The default settings may not be directly modified for OTR sessions.
// Instead, they are synced to the main profile's setting.
if (is_incognito_)
- return false;
+ return true;
- // Put |in_value| in a scoped pointer to ensure that it gets cleaned up
- // properly if we don't pass on the ownership.
- scoped_ptr<base::Value> value(in_value);
{
base::AutoReset<bool> auto_reset(&updating_preferences_, true);
// Lock the memory map access, so that values are not read by

Powered by Google App Engine
This is Rietveld 408576698