diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 23:25:49 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 23:25:49 +0000 |
commit | da0c8e9e4c51699ef08ee449fe83fc1fb24b773d (patch) | |
tree | 671475593d2a739ed91dae72e631173ddd6219eb /chrome/browser/tab_contents | |
parent | 42da24d2930b8c2257f3560366a8eff766d8fb9b (diff) | |
download | chromium_src-da0c8e9e4c51699ef08ee449fe83fc1fb24b773d.zip chromium_src-da0c8e9e4c51699ef08ee449fe83fc1fb24b773d.tar.gz chromium_src-da0c8e9e4c51699ef08ee449fe83fc1fb24b773d.tar.bz2 |
Whitelist all content for various internal schemes.
BUG=34805
TEST=New Tab page should still work if you disable script + images
Review URL: http://codereview.chromium.org/588011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 9c334dc..58eb083 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -1321,7 +1321,7 @@ void TabContents::AddPopup(TabContents* new_contents, GURL url(GetURL()); if (url.is_valid() && profile()->GetHostContentSettingsMap()->GetContentSetting( - url.host(), CONTENT_SETTINGS_TYPE_POPUPS) == CONTENT_SETTING_ALLOW) { + url, CONTENT_SETTINGS_TYPE_POPUPS) == CONTENT_SETTING_ALLOW) { AddNewContents(new_contents, NEW_POPUP, initial_pos, true); } else { if (!blocked_popups_) @@ -2763,15 +2763,18 @@ void TabContents::Observe(NotificationType type, case NotificationType::CONTENT_SETTINGS_CHANGED: { Details<HostContentSettingsMap::ContentSettingsDetails> settings_details(details); - std::string host; NavigationEntry* entry = controller_.GetActiveEntry(); - if (entry) - host = entry->url().host(); + GURL entry_url; + std::string host; + if (entry) { + entry_url = entry->url(); + host = entry_url.host(); + } Source<HostContentSettingsMap> content_settings(source); if (settings_details.ptr()->host().empty() || settings_details.ptr()->host() == host) { render_view_host()->SendContentSettings(host, - content_settings.ptr()->GetContentSettings(host)); + content_settings.ptr()->GetContentSettings(entry_url)); } break; } |