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

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

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 years, 5 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
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 51edd3be3ede2e5dc147b5f26ad3587baec0b264..01ae1501496fa1f0d5ee1162b109c940a42d6055 100644
--- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
+++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc
@@ -137,7 +137,8 @@ void CollectedCookiesSource::StartDataRequest(const std::string& path,
void CollectedCookiesUIDelegate::Show(TabContents* tab_contents) {
CollectedCookiesUIDelegate* delegate =
new CollectedCookiesUIDelegate(tab_contents);
- ConstrainedHtmlUI::CreateConstrainedHtmlDialog(tab_contents->profile(),
+ Profile* profile = static_cast<Profile*>(tab_contents->context());
+ ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile,
delegate,
tab_contents);
}
@@ -146,11 +147,11 @@ CollectedCookiesUIDelegate::CollectedCookiesUIDelegate(
TabContents* tab_contents)
: tab_contents_(tab_contents),
closed_(false) {
- TabSpecificContentSettings* content_settings =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents)->
- content_settings();
+ TabContentsWrapper* wrapper =
+ TabContentsWrapper::GetCurrentWrapperForContents(tab_contents);
+ TabSpecificContentSettings* content_settings = wrapper->content_settings();
HostContentSettingsMap* host_content_settings_map =
- tab_contents_->profile()->GetHostContentSettingsMap();
+ wrapper->profile()->GetHostContentSettingsMap();
registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
Source<TabSpecificContentSettings>(content_settings));
@@ -162,7 +163,7 @@ CollectedCookiesUIDelegate::CollectedCookiesUIDelegate(
CollectedCookiesSource* source = new CollectedCookiesSource(
host_content_settings_map->BlockThirdPartyCookies());
- tab_contents->profile()->GetChromeURLDataManager()->AddDataSource(source);
+ wrapper->profile()->GetChromeURLDataManager()->AddDataSource(source);
}
CollectedCookiesUIDelegate::~CollectedCookiesUIDelegate() {

Powered by Google App Engine
This is Rietveld 408576698