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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 585953003: Fix a bug where ContentSettingsHandler did not listen for OTR content settings changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 83e99e915d649078e2340feff2fbc43f8afd7cff..cdddc6c3b8e132ff832ea807beab004087a1b608 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -268,7 +268,8 @@ ContentSettingsHandler::MediaSettingsInfo::MediaSettingsInfo()
ContentSettingsHandler::MediaSettingsInfo::~MediaSettingsInfo() {
}
-ContentSettingsHandler::ContentSettingsHandler() : observer_(this) {
+ContentSettingsHandler::ContentSettingsHandler()
+ : observer_(this), otr_observer_(this) {
}
ContentSettingsHandler::~ContentSettingsHandler() {
@@ -535,8 +536,13 @@ void ContentSettingsHandler::Observe(
}
case chrome::NOTIFICATION_PROFILE_CREATED: {
- if (content::Source<Profile>(source).ptr()->IsOffTheRecord())
+ Profile* profile = content::Source<Profile>(source).ptr();
+ if (profile->IsOffTheRecord()) {
UpdateAllOTRExceptionsViewsFromModel();
+
+ if (profile->GetOriginalProfile() != profile)
Bernhard Bauer 2014/09/19 18:18:50 In what super fun special case is the original pro
Daniel Nishi 2014/09/19 19:49:15 It actually looks like the Guest Mode case is more
+ otr_observer_.Add(profile->GetHostContentSettingsMap());
+ }
break;
}

Powered by Google App Engine
This is Rietveld 408576698