| 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 "components/content_settings/core/browser/host_content_settings_map.h" | 5 #include "components/content_settings/core/browser/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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 content_settings::SettingSource kProviderSourceMap[] = { | 57 content_settings::SettingSource kProviderSourceMap[] = { |
| 58 content_settings::SETTING_SOURCE_EXTENSION, | 58 content_settings::SETTING_SOURCE_EXTENSION, |
| 59 content_settings::SETTING_SOURCE_POLICY, | 59 content_settings::SETTING_SOURCE_POLICY, |
| 60 content_settings::SETTING_SOURCE_EXTENSION, | 60 content_settings::SETTING_SOURCE_EXTENSION, |
| 61 content_settings::SETTING_SOURCE_USER, | 61 content_settings::SETTING_SOURCE_USER, |
| 62 content_settings::SETTING_SOURCE_USER, | 62 content_settings::SETTING_SOURCE_USER, |
| 63 content_settings::SETTING_SOURCE_USER, | 63 content_settings::SETTING_SOURCE_USER, |
| 64 }; | 64 }; |
| 65 COMPILE_ASSERT(arraysize(kProviderSourceMap) == | 65 static_assert(arraysize(kProviderSourceMap) == |
| 66 HostContentSettingsMap::NUM_PROVIDER_TYPES, | 66 HostContentSettingsMap::NUM_PROVIDER_TYPES, |
| 67 kProviderSourceMap_has_incorrect_size); | 67 "kProviderSourceMap should have NUM_PROVIDER_TYPES elements"); |
| 68 | 68 |
| 69 // Returns true if the |content_type| supports a resource identifier. | 69 // Returns true if the |content_type| supports a resource identifier. |
| 70 // Resource identifiers are supported (but not required) for plug-ins. | 70 // Resource identifiers are supported (but not required) for plug-ins. |
| 71 bool SupportsResourceIdentifier(ContentSettingsType content_type) { | 71 bool SupportsResourceIdentifier(ContentSettingsType content_type) { |
| 72 return content_type == CONTENT_SETTINGS_TYPE_PLUGINS; | 72 return content_type == CONTENT_SETTINGS_TYPE_PLUGINS; |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace | 75 } // namespace |
| 76 | 76 |
| 77 HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, | 77 HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 } | 746 } |
| 747 } | 747 } |
| 748 | 748 |
| 749 if (info) { | 749 if (info) { |
| 750 info->source = content_settings::SETTING_SOURCE_NONE; | 750 info->source = content_settings::SETTING_SOURCE_NONE; |
| 751 info->primary_pattern = ContentSettingsPattern(); | 751 info->primary_pattern = ContentSettingsPattern(); |
| 752 info->secondary_pattern = ContentSettingsPattern(); | 752 info->secondary_pattern = ContentSettingsPattern(); |
| 753 } | 753 } |
| 754 return scoped_ptr<base::Value>(); | 754 return scoped_ptr<base::Value>(); |
| 755 } | 755 } |
| OLD | NEW |