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

Unified Diff: chrome/browser/content_settings/host_content_settings_map_factory.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: chrome/browser/content_settings/host_content_settings_map_factory.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc
index 386c277d856600892a7069382f06bedbdd97bc98..c95b10490d63be38b504458fe240ea563043c7b9 100644
--- a/chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -61,15 +61,16 @@ scoped_refptr<RefcountedKeyedService>
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
Profile* profile = static_cast<Profile*>(context);
- bool off_the_record = profile->GetProfileType() == Profile::INCOGNITO_PROFILE;
// If off the record, retrieve the host content settings map of the parent
// profile in order to ensure the preferences have been migrated.
- if (off_the_record)
+ if (profile->GetProfileType() == Profile::INCOGNITO_PROFILE)
GetForProfile(profile->GetOriginalProfile());
- scoped_refptr<HostContentSettingsMap> settings_map(
- new HostContentSettingsMap(profile->GetPrefs(), off_the_record));
+ scoped_refptr<HostContentSettingsMap> settings_map(new HostContentSettingsMap(
+ profile->GetPrefs(),
+ profile->GetProfileType() == Profile::INCOGNITO_PROFILE,
+ profile->GetProfileType() == Profile::GUEST_PROFILE));
#if defined(ENABLE_EXTENSIONS)
ExtensionService *ext_service =

Powered by Google App Engine
This is Rietveld 408576698