diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-02 13:10:52 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-02 13:10:52 +0000 |
commit | 0ac43d3a2f125c07a022ec070460302f123a71a2 (patch) | |
tree | 495af94dff705651e12e90672a473fb18f7579b7 /chrome/renderer/content_settings_observer.cc | |
parent | 7293e834b2a590e0eb4205045b2e270997dd1e6b (diff) | |
download | chromium_src-0ac43d3a2f125c07a022ec070460302f123a71a2.zip chromium_src-0ac43d3a2f125c07a022ec070460302f123a71a2.tar.gz chromium_src-0ac43d3a2f125c07a022ec070460302f123a71a2.tar.bz2 |
Remove static ContentSettingsObserver::default_settings_.
Store default content settings in ChromeRenderProcessObserver instead.
BUG=94879
TEST=NONE
Review URL: http://codereview.chromium.org/8403032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108280 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/content_settings_observer.cc')
-rw-r--r-- | chrome/renderer/content_settings_observer.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc index 525159f..24b0db3 100644 --- a/chrome/renderer/content_settings_observer.cc +++ b/chrome/renderer/content_settings_observer.cc @@ -61,12 +61,12 @@ GURL GetOriginOrURL(const WebFrame* frame) { } // namespace -ContentSettings ContentSettingsObserver::default_settings_; - ContentSettingsObserver::ContentSettingsObserver( content::RenderView* render_view) : content::RenderViewObserver(render_view), content::RenderViewObserverTracker<ContentSettingsObserver>(render_view), + default_content_settings_(NULL), + image_setting_rules_(NULL), plugins_temporarily_allowed_(false) { ClearBlockedContentSettings(); } @@ -80,8 +80,8 @@ void ContentSettingsObserver::SetContentSettings( } void ContentSettingsObserver::SetDefaultContentSettings( - const ContentSettings& settings) { - default_settings_ = settings; + const ContentSettings* settings) { + default_content_settings_ = settings; } void ContentSettingsObserver::SetImageSettingRules( @@ -150,7 +150,8 @@ void ContentSettingsObserver::DidCommitProvisionalLoad( // We exempt file URLs here because we sandbox them by default, but folks // might reasonably want to supply non-default content settings for various // file URLs. - SetContentSettings(default_settings_); + if (default_content_settings_) + SetContentSettings(*default_content_settings_); return; } |