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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 8498007: ContentSettingsObserver (+ related classes) cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing struct ContentSettings, too. Created 9 years, 1 month 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/tab_specific_content_settings.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 91948d5eb3a39445fb81c006df8df96da6defcdb..fda4042909dae99b7c7e8762a4295d9de52ecd14 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -431,15 +431,6 @@ void TabSpecificContentSettings::DidNavigateMainFramePostCommit(
}
}
-void TabSpecificContentSettings::RenderViewCreated(
- RenderViewHost* render_view_host) {
- Profile* profile =
- Profile::FromBrowserContext(tab_contents()->browser_context());
- HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
- render_view_host->Send(new ChromeViewMsg_SetDefaultContentSettings(
- map->GetDefaultContentSettings()));
-}
-
void TabSpecificContentSettings::DidStartProvisionalLoadForFrame(
int64 frame_id,
bool is_main_frame,
@@ -486,13 +477,9 @@ void TabSpecificContentSettings::Observe(
settings_details.ptr()->primary_pattern().Matches(entry_url)) {
Profile* profile =
Profile::FromBrowserContext(tab_contents()->browser_context());
- HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
- Send(new ChromeViewMsg_SetDefaultContentSettings(
- map->GetDefaultContentSettings()));
- Send(new ChromeViewMsg_SetContentSettingsForCurrentURL(
- entry_url, map->GetContentSettings(entry_url)));
RendererContentSettingRules rules;
- GetRendererContentSettingRules(map, &rules);
+ GetRendererContentSettingRules(profile->GetHostContentSettingsMap(),
+ &rules);
Send(new ChromeViewMsg_SetContentSettingRules(rules));
}
}

Powered by Google App Engine
This is Rietveld 408576698