summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 18:24:18 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 18:24:18 +0000
commit699ea7ea271a2ba861ebdd78226fac567d24ba7e (patch)
treee21eef39ac81b09bd8ff80bd35dcfd0125d6d76d /content
parentf6e8e1e30b038f25432fb66a771851814071cdce (diff)
downloadchromium_src-699ea7ea271a2ba861ebdd78226fac567d24ba7e.zip
chromium_src-699ea7ea271a2ba861ebdd78226fac567d24ba7e.tar.gz
chromium_src-699ea7ea271a2ba861ebdd78226fac567d24ba7e.tar.bz2
Move TabSpecificContentSettings to TabContentWrapper.
This is a reland of 85278 with the Mac test failures fixed. Review URL: http://codereview.chromium.org/7015048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_view_host_browsertest.cc22
-rw-r--r--content/browser/tab_contents/tab_contents.cc6
-rw-r--r--content/browser/tab_contents/tab_contents.h8
3 files changed, 0 insertions, 36 deletions
diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc
index 253ac8b..2146acd 100644
--- a/content/browser/renderer_host/render_view_host_browsertest.cc
+++ b/content/browser/renderer_host/render_view_host_browsertest.cc
@@ -2,11 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/utf_string_conversions.h"
#include "base/time.h"
#include "base/values.h"
-#include "chrome/browser/content_settings/host_content_settings_map.h"
-#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/in_process_browser_test.h"
@@ -208,25 +205,6 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostTest,
}
}
-// Regression test for http://crbug.com/63649.
-IN_PROC_BROWSER_TEST_F(RenderViewHostTest, RedirectLoopCookies) {
- ASSERT_TRUE(test_server()->Start());
-
- GURL test_url = test_server()->GetURL("files/redirect-loop.html");
-
- browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
- CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_BLOCK);
-
- ui_test_utils::NavigateToURL(browser(), test_url);
-
- TabContents* tab_contents = browser()->GetSelectedTabContents();
- ASSERT_EQ(UTF8ToUTF16(test_url.spec() + " failed to load"),
- tab_contents->GetTitle());
-
- EXPECT_TRUE(tab_contents->GetTabSpecificContentSettings()->IsContentBlocked(
- CONTENT_SETTINGS_TYPE_COOKIES));
-}
-
class RenderViewHostTestTabContentsObserver : public TabContentsObserver {
public:
explicit RenderViewHostTestTabContentsObserver(TabContents* tab_contents)
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index fc201e4..d51e63e 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -15,7 +15,6 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
-#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/debugger/devtools_manager.h"
#include "chrome/browser/defaults.h"
#include "chrome/browser/download/download_request_limiter.h"
@@ -336,7 +335,6 @@ TabContents::~TabContents() {
}
void TabContents::AddObservers() {
- content_settings_delegate_.reset(new TabSpecificContentSettings(this));
plugin_observer_.reset(new PluginObserver(this));
net::NetworkChangeNotifier::AddOnlineStateObserver(this);
}
@@ -1513,10 +1511,6 @@ void TabContents::SetBookmarkDragDelegate(
bookmark_drag_ = bookmark_drag;
}
-TabSpecificContentSettings* TabContents::GetTabSpecificContentSettings() const {
- return content_settings_delegate_.get();
-}
-
RendererPreferences TabContents::GetRendererPrefs(Profile* profile) const {
return renderer_preferences_;
}
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index 87e0fde..9a382b0 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -59,7 +59,6 @@ class TabContentsDelegate;
class TabContentsObserver;
class TabContentsSSLHelper;
class TabContentsView;
-class TabSpecificContentSettings;
class URLPattern;
struct RendererPreferences;
struct ThumbnailScore;
@@ -515,10 +514,6 @@ class TabContents : public PageNavigator,
virtual void SetBookmarkDragDelegate(
RenderViewHostDelegate::BookmarkDrag* bookmark_drag);
- // The TabSpecificContentSettings object is used to query the blocked content
- // state by various UI elements.
- TabSpecificContentSettings* GetTabSpecificContentSettings() const;
-
// Updates history with the specified navigation. This is called by
// OnMsgNavigate to update history state.
void UpdateHistoryForNavigation(
@@ -864,9 +859,6 @@ class TabContents : public PageNavigator,
// Handles drag and drop event forwarding to extensions.
BookmarkDrag* bookmark_drag_;
- // RenderViewHost::ContentSettingsDelegate.
- scoped_ptr<TabSpecificContentSettings> content_settings_delegate_;
-
// Data for loading state ----------------------------------------------------
// Indicates whether we're currently loading a resource.