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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: More code review comments. Created 9 years, 3 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/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 605f87bdebe3473ab596a5a24919d6d99ec4a76f..cd86e5b335b01e1a665fa701a43fedc9e140246c 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -14,6 +14,7 @@
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/content_settings_details.h"
+#include "chrome/browser/content_settings/content_settings_provider.h"
#include "chrome/browser/content_settings/content_settings_utils.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
@@ -451,15 +452,16 @@ void ContentSettingsHandler::UpdateGeolocationExceptionsView() {
Profile* profile = Profile::FromWebUI(web_ui_);
HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
- HostContentSettingsMap::SettingsForOneType all_settings;
+ ContentSettingsForOneType all_settings;
map->GetSettingsForOneType(
CONTENT_SETTINGS_TYPE_GEOLOCATION,
std::string(),
+ content_settings::ProviderInterface::Rule::LexicographicalSort,
&all_settings);
// Group geolocation settings by primary_pattern.
AllPatternsSettings all_patterns_settings;
- for (HostContentSettingsMap::SettingsForOneType::iterator i =
+ for (ContentSettingsForOneType::iterator i =
all_settings.begin();
i != all_settings.end();
++i) {
@@ -511,15 +513,15 @@ void ContentSettingsHandler::UpdateNotificationExceptionsView() {
DesktopNotificationService* service =
DesktopNotificationServiceFactory::GetForProfile(profile);
- HostContentSettingsMap::SettingsForOneType settings;
+ ContentSettingsForOneType settings;
service->GetNotificationsSettings(&settings);
ListValue exceptions;
- for (HostContentSettingsMap::SettingsForOneType::const_iterator i =
+ for (ContentSettingsForOneType::const_iterator i =
settings.begin();
i != settings.end();
++i) {
- const HostContentSettingsMap::PatternSettingSourceTuple& tuple(*i);
+ const ContentSettingPatternSourceTuple& tuple(*i);
exceptions.Append(
GetNotificationExceptionForPage(tuple.a, tuple.c, tuple.d));
}
@@ -536,8 +538,11 @@ void ContentSettingsHandler::UpdateNotificationExceptionsView() {
void ContentSettingsHandler::UpdateExceptionsViewFromHostContentSettingsMap(
ContentSettingsType type) {
- HostContentSettingsMap::SettingsForOneType entries;
- GetContentSettingsMap()->GetSettingsForOneType(type, "", &entries);
+ ContentSettingsForOneType entries;
+ GetContentSettingsMap()->GetSettingsForOneType(
+ type, "",
+ content_settings::ProviderInterface::Rule::LexicographicalSort,
+ &entries);
ListValue exceptions;
for (size_t i = 0; i < entries.size(); ++i) {
@@ -572,8 +577,11 @@ void ContentSettingsHandler::UpdateExceptionsViewFromOTRHostContentSettingsMap(
if (!otr_settings_map)
return;
- HostContentSettingsMap::SettingsForOneType otr_entries;
- otr_settings_map->GetSettingsForOneType(type, "", &otr_entries);
+ ContentSettingsForOneType otr_entries;
+ otr_settings_map->GetSettingsForOneType(
+ type, "",
+ content_settings::ProviderInterface::Rule::LexicographicalSort,
+ &otr_entries);
ListValue otr_exceptions;
for (size_t i = 0; i < otr_entries.size(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698