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

Unified Diff: chrome/browser/ui/webui/collected_cookies_ui_delegate.cc

Issue 7831051: content: Move collected cookies constrained window to TabContentsWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile failures for everyone\! Created 9 years, 4 months 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/browser/ui/webui/collected_cookies_ui_delegate.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
index 0ad2f38cb8909853b02cbfaf41dd6301183b588e..9ab974321953cec091ab9321b350eef56c7072ee 100644
--- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
+++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
@@ -130,22 +130,19 @@ void CollectedCookiesSource::StartDataRequest(const std::string& path,
} // namespace
// static
-void CollectedCookiesUIDelegate::Show(TabContents* tab_contents) {
+void CollectedCookiesUIDelegate::Show(TabContentsWrapper* wrapper) {
CollectedCookiesUIDelegate* delegate =
- new CollectedCookiesUIDelegate(tab_contents);
- Profile* profile =
- Profile::FromBrowserContext(tab_contents->browser_context());
+ new CollectedCookiesUIDelegate(wrapper);
+ Profile* profile = wrapper->profile();
ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile,
delegate,
- tab_contents);
+ wrapper->tab_contents());
}
CollectedCookiesUIDelegate::CollectedCookiesUIDelegate(
- TabContents* tab_contents)
- : tab_contents_(tab_contents),
+ TabContentsWrapper* wrapper)
+ : wrapper_(wrapper),
closed_(false) {
- TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
TabSpecificContentSettings* content_settings = wrapper->content_settings();
HostContentSettingsMap* host_content_settings_map =
wrapper->profile()->GetHostContentSettingsMap();
@@ -229,8 +226,7 @@ void CollectedCookiesUIDelegate::SetInfobarLabel(const std::string& text) {
void CollectedCookiesUIDelegate::AddContentException(
CookieTreeOriginNode* origin_node, ContentSetting setting) {
if (origin_node->CanCreateContentException()) {
- Profile* profile =
- Profile::FromBrowserContext(tab_contents_->browser_context());
+ Profile* profile = wrapper_->profile();
origin_node->CreateContentException(profile->GetHostContentSettingsMap(),
setting);
« no previous file with comments | « chrome/browser/ui/webui/collected_cookies_ui_delegate.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698