| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 DCHECK(content_type != CONTENT_SETTINGS_TYPE_GEOLOCATION) | 192 DCHECK(content_type != CONTENT_SETTINGS_TYPE_GEOLOCATION) |
| 193 << "Geolocation settings handled by ContentSettingGeolocationImageModel"; | 193 << "Geolocation settings handled by ContentSettingGeolocationImageModel"; |
| 194 DCHECK(content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS) | 194 DCHECK(content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS) |
| 195 << "Notifications settings handled by " | 195 << "Notifications settings handled by " |
| 196 << "ContentSettingsNotificationsImageModel"; | 196 << "ContentSettingsNotificationsImageModel"; |
| 197 | 197 |
| 198 if (content_type == CONTENT_SETTINGS_TYPE_IMAGES || | 198 if (content_type == CONTENT_SETTINGS_TYPE_IMAGES || |
| 199 content_type == CONTENT_SETTINGS_TYPE_JAVASCRIPT || | 199 content_type == CONTENT_SETTINGS_TYPE_JAVASCRIPT || |
| 200 content_type == CONTENT_SETTINGS_TYPE_PLUGINS || | 200 content_type == CONTENT_SETTINGS_TYPE_PLUGINS || |
| 201 content_type == CONTENT_SETTINGS_TYPE_COOKIES || | 201 content_type == CONTENT_SETTINGS_TYPE_COOKIES || |
| 202 content_type == CONTENT_SETTINGS_TYPE_POPUPS) | 202 content_type == CONTENT_SETTINGS_TYPE_POPUPS || |
| 203 content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) |
| 203 return content_blocked_[content_type]; | 204 return content_blocked_[content_type]; |
| 204 | 205 |
| 205 return false; | 206 return false; |
| 206 } | 207 } |
| 207 | 208 |
| 208 bool TabSpecificContentSettings::IsBlockageIndicated( | 209 bool TabSpecificContentSettings::IsBlockageIndicated( |
| 209 ContentSettingsType content_type) const { | 210 ContentSettingsType content_type) const { |
| 210 return content_blockage_indicated_to_user_[content_type]; | 211 return content_blockage_indicated_to_user_[content_type]; |
| 211 } | 212 } |
| 212 | 213 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 534 } |
| 534 | 535 |
| 535 void TabSpecificContentSettings::RemoveSiteDataObserver( | 536 void TabSpecificContentSettings::RemoveSiteDataObserver( |
| 536 SiteDataObserver* observer) { | 537 SiteDataObserver* observer) { |
| 537 observer_list_.RemoveObserver(observer); | 538 observer_list_.RemoveObserver(observer); |
| 538 } | 539 } |
| 539 | 540 |
| 540 void TabSpecificContentSettings::NotifySiteDataObservers() { | 541 void TabSpecificContentSettings::NotifySiteDataObservers() { |
| 541 FOR_EACH_OBSERVER(SiteDataObserver, observer_list_, OnSiteDataAccessed()); | 542 FOR_EACH_OBSERVER(SiteDataObserver, observer_list_, OnSiteDataAccessed()); |
| 542 } | 543 } |
| OLD | NEW |