| 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/host_content_settings_map.h" | 5 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 bool HostContentSettingsMap::IsSettingAllowedForType( | 336 bool HostContentSettingsMap::IsSettingAllowedForType( |
| 337 PrefService* prefs, | 337 PrefService* prefs, |
| 338 ContentSetting setting, | 338 ContentSetting setting, |
| 339 ContentSettingsType content_type) { | 339 ContentSettingsType content_type) { |
| 340 // Intents content settings are hidden behind a switch for now. | 340 // Intents content settings are hidden behind a switch for now. |
| 341 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) { | 341 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) { |
| 342 if (!web_intents::IsWebIntentsEnabled(prefs)) | 342 if (!web_intents::IsWebIntentsEnabled(prefs)) |
| 343 return false; | 343 return false; |
| 344 } | 344 } |
| 345 | 345 |
| 346 // We don't yet support stored content settings for mixed scripting. |
| 347 if (content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) |
| 348 return false; |
| 349 |
| 346 // BLOCK semantics are not implemented for fullscreen. | 350 // BLOCK semantics are not implemented for fullscreen. |
| 347 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && | 351 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && |
| 348 setting == CONTENT_SETTING_BLOCK) { | 352 setting == CONTENT_SETTING_BLOCK) { |
| 349 return false; | 353 return false; |
| 350 } | 354 } |
| 351 | 355 |
| 352 // DEFAULT, ALLOW and BLOCK are always allowed. | 356 // DEFAULT, ALLOW and BLOCK are always allowed. |
| 353 if (setting == CONTENT_SETTING_DEFAULT || | 357 if (setting == CONTENT_SETTING_DEFAULT || |
| 354 setting == CONTENT_SETTING_ALLOW || | 358 setting == CONTENT_SETTING_ALLOW || |
| 355 setting == CONTENT_SETTING_BLOCK) { | 359 setting == CONTENT_SETTING_BLOCK) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 } | 536 } |
| 533 } | 537 } |
| 534 | 538 |
| 535 if (info) { | 539 if (info) { |
| 536 info->source = content_settings::SETTING_SOURCE_NONE; | 540 info->source = content_settings::SETTING_SOURCE_NONE; |
| 537 info->primary_pattern = ContentSettingsPattern(); | 541 info->primary_pattern = ContentSettingsPattern(); |
| 538 info->secondary_pattern = ContentSettingsPattern(); | 542 info->secondary_pattern = ContentSettingsPattern(); |
| 539 } | 543 } |
| 540 return NULL; | 544 return NULL; |
| 541 } | 545 } |
| OLD | NEW |