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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 bool HostContentSettingsMap::IsValueAllowedForType( | 316 bool HostContentSettingsMap::IsValueAllowedForType( |
317 const base::Value* value, ContentSettingsType type) { | 317 const base::Value* value, ContentSettingsType type) { |
318 return IsSettingAllowedForType( | 318 return IsSettingAllowedForType( |
319 content_settings::ValueToContentSetting(value), type); | 319 content_settings::ValueToContentSetting(value), type); |
320 } | 320 } |
321 | 321 |
322 // static | 322 // static |
323 bool HostContentSettingsMap::IsSettingAllowedForType( | 323 bool HostContentSettingsMap::IsSettingAllowedForType( |
324 ContentSetting setting, ContentSettingsType content_type) { | 324 ContentSetting setting, ContentSettingsType content_type) { |
325 // Intents content settings are hidden behind a switch for now. | 325 // Intents content settings are hidden behind a switch for now. |
326 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS && | 326 if (content_type == CONTENT_SETTINGS_TYPE_INTENTS) { |
327 !web_intents::IsWebIntentsEnabled()) | 327 #if !defined(OS_ANDROID) |
| 328 if (!web_intents::IsWebIntentsEnabled()) |
| 329 return false; |
| 330 #else |
328 return false; | 331 return false; |
| 332 #endif |
| 333 } |
329 | 334 |
330 // BLOCK semantics are not implemented for fullscreen. | 335 // BLOCK semantics are not implemented for fullscreen. |
331 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && | 336 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN && |
332 setting == CONTENT_SETTING_BLOCK) { | 337 setting == CONTENT_SETTING_BLOCK) { |
333 return false; | 338 return false; |
334 } | 339 } |
335 | 340 |
336 // DEFAULT, ALLOW and BLOCK are always allowed. | 341 // DEFAULT, ALLOW and BLOCK are always allowed. |
337 if (setting == CONTENT_SETTING_DEFAULT || | 342 if (setting == CONTENT_SETTING_DEFAULT || |
338 setting == CONTENT_SETTING_ALLOW || | 343 setting == CONTENT_SETTING_ALLOW || |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 } | 471 } |
467 } | 472 } |
468 | 473 |
469 if (info) { | 474 if (info) { |
470 info->source = content_settings::SETTING_SOURCE_NONE; | 475 info->source = content_settings::SETTING_SOURCE_NONE; |
471 info->primary_pattern = ContentSettingsPattern(); | 476 info->primary_pattern = ContentSettingsPattern(); |
472 info->secondary_pattern = ContentSettingsPattern(); | 477 info->secondary_pattern = ContentSettingsPattern(); |
473 } | 478 } |
474 return NULL; | 479 return NULL; |
475 } | 480 } |
OLD | NEW |