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

Unified Diff: chrome/browser/content_setting_image_model.cc

Issue 2370001: Store blocked cookies in the tab contents. (Closed)
Patch Set: updates Created 10 years, 6 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/content_setting_image_model.cc
diff --git a/chrome/browser/content_setting_image_model.cc b/chrome/browser/content_setting_image_model.cc
index b1a0a53ab5709c9a6310aa8013593f31e413b3b3..26e349acdab5638a62da06e9b0a87d178741ec0e 100644
--- a/chrome/browser/content_setting_image_model.cc
+++ b/chrome/browser/content_setting_image_model.cc
@@ -59,8 +59,10 @@ ContentSettingBlockedImageModel::ContentSettingBlockedImageModel(
void ContentSettingBlockedImageModel::UpdateFromTabContents(
const TabContents* tab_contents) {
- if (!tab_contents ||
- !tab_contents->IsContentBlocked(get_content_settings_type())) {
+ TabSpecificContentSettings* content_settings = tab_contents ?
+ tab_contents->GetTabSpecificContentSettings() : NULL;
+ if (!content_settings ||
+ !content_settings->IsContentBlocked(get_content_settings_type())) {
set_visible(false);
return;
}
@@ -80,8 +82,10 @@ void ContentSettingGeolocationImageModel::UpdateFromTabContents(
set_visible(false);
return;
}
+ TabSpecificContentSettings* content_settings =
+ tab_contents->GetTabSpecificContentSettings();
const GeolocationSettingsState& settings_state =
- tab_contents->geolocation_settings_state();
+ content_settings->geolocation_settings_state();
if (settings_state.state_map().empty()) {
set_visible(false);
return;

Powered by Google App Engine
This is Rietveld 408576698