| 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/content_settings_utils.h" | 5 #include "components/content_settings/core/browser/content_settings_utils.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 "ssl-cert-decisions", | 44 "ssl-cert-decisions", |
| 45 #if defined(OS_WIN) | 45 #if defined(OS_WIN) |
| 46 "metro-switch-to-desktop", | 46 "metro-switch-to-desktop", |
| 47 #elif defined(OS_ANDROID) || defined(OS_CHROMEOS) | 47 #elif defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 48 "protected-media-identifier", | 48 "protected-media-identifier", |
| 49 #endif | 49 #endif |
| 50 #if defined(OS_ANDROID) | 50 #if defined(OS_ANDROID) |
| 51 "app-banner", | 51 "app-banner", |
| 52 #endif | 52 #endif |
| 53 }; | 53 }; |
| 54 COMPILE_ASSERT(arraysize(kTypeNames) == CONTENT_SETTINGS_NUM_TYPES, | 54 static_assert(arraysize(kTypeNames) == CONTENT_SETTINGS_NUM_TYPES, |
| 55 type_names_incorrect_size); | 55 "kTypeNames should have CONTENT_SETTINGS_NUM_TYPES elements"); |
| 56 | 56 |
| 57 const char kPatternSeparator[] = ","; | 57 const char kPatternSeparator[] = ","; |
| 58 | 58 |
| 59 } // namespace | 59 } // namespace |
| 60 | 60 |
| 61 namespace content_settings { | 61 namespace content_settings { |
| 62 | 62 |
| 63 std::string GetTypeName(ContentSettingsType type) { | 63 std::string GetTypeName(ContentSettingsType type) { |
| 64 return std::string(kTypeNames[type]); | 64 return std::string(kTypeNames[type]); |
| 65 } | 65 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 void GetRendererContentSettingRules(const HostContentSettingsMap* map, | 223 void GetRendererContentSettingRules(const HostContentSettingsMap* map, |
| 224 RendererContentSettingRules* rules) { | 224 RendererContentSettingRules* rules) { |
| 225 map->GetSettingsForOneType( | 225 map->GetSettingsForOneType( |
| 226 CONTENT_SETTINGS_TYPE_IMAGES, std::string(), &(rules->image_rules)); | 226 CONTENT_SETTINGS_TYPE_IMAGES, std::string(), &(rules->image_rules)); |
| 227 map->GetSettingsForOneType( | 227 map->GetSettingsForOneType( |
| 228 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &(rules->script_rules)); | 228 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &(rules->script_rules)); |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace content_settings | 231 } // namespace content_settings |
| OLD | NEW |