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

Unified Diff: chrome/renderer/chrome_render_process_observer.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
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.h ('k') | chrome/renderer/content_settings_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_process_observer.cc
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc
index 0b2fd951d8403797a6bbf55b02d3281e0adea77d..c1ff810746ed89ece960dfefaffce32510c97c09 100644
--- a/chrome/renderer/chrome_render_process_observer.cc
+++ b/chrome/renderer/chrome_render_process_observer.cc
@@ -106,30 +106,6 @@ class RendererResourceDelegate : public content::ResourceDispatcherDelegate {
DISALLOW_COPY_AND_ASSIGN(RendererResourceDelegate);
};
-class RenderViewContentSettingsSetter : public content::RenderViewVisitor {
- public:
- RenderViewContentSettingsSetter(const GURL& url,
- const ContentSettings& content_settings)
- : url_(url),
- content_settings_(content_settings) {
- }
-
- virtual bool Visit(content::RenderView* render_view) {
- if (GURL(render_view->GetWebView()->mainFrame()->document().url()) ==
- url_) {
- ContentSettingsObserver::Get(render_view)->SetContentSettings(
- content_settings_);
- }
- return true;
- }
-
- private:
- GURL url_;
- ContentSettings content_settings_;
-
- DISALLOW_COPY_AND_ASSIGN(RenderViewContentSettingsSetter);
-};
-
#if defined(OS_WIN)
static base::win::IATPatchFunction g_iat_patch_createdca;
HDC WINAPI CreateDCAPatch(LPCSTR driver_name,
@@ -263,10 +239,6 @@ bool ChromeRenderProcessObserver::OnControlMessageReceived(
IPC_BEGIN_MESSAGE_MAP(ChromeRenderProcessObserver, message)
IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsIncognitoProcess,
OnSetIsIncognitoProcess)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_SetDefaultContentSettings,
- OnSetDefaultContentSettings)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_SetContentSettingsForCurrentURL,
- OnSetContentSettingsForCurrentURL)
IPC_MESSAGE_HANDLER(ChromeViewMsg_SetContentSettingRules,
OnSetContentSettingRules)
IPC_MESSAGE_HANDLER(ChromeViewMsg_SetCacheCapacities, OnSetCacheCapacities)
@@ -298,18 +270,6 @@ void ChromeRenderProcessObserver::OnSetIsIncognitoProcess(
is_incognito_process_ = is_incognito_process;
}
-void ChromeRenderProcessObserver::OnSetContentSettingsForCurrentURL(
- const GURL& url,
- const ContentSettings& content_settings) {
- RenderViewContentSettingsSetter setter(url, content_settings);
- content::RenderView::ForEach(&setter);
-}
-
-void ChromeRenderProcessObserver::OnSetDefaultContentSettings(
- const ContentSettings& content_settings) {
- default_content_settings_ = content_settings;
-}
-
void ChromeRenderProcessObserver::OnSetContentSettingRules(
const RendererContentSettingRules& rules) {
content_setting_rules_ = rules;
@@ -434,8 +394,3 @@ const RendererContentSettingRules*
ChromeRenderProcessObserver::content_setting_rules() const {
return &content_setting_rules_;
}
-
-const ContentSettings*
-ChromeRenderProcessObserver::default_content_settings() const {
- return &default_content_settings_;
-}
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.h ('k') | chrome/renderer/content_settings_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698