| 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/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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
| 13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/browser/content_settings/host_content_settings_map.h" | |
| 16 #include "chrome/common/chrome_switches.h" | |
| 17 #include "components/content_settings/core/browser/content_settings_provider.h" | 15 #include "components/content_settings/core/browser/content_settings_provider.h" |
| 18 #include "components/content_settings/core/browser/content_settings_rule.h" | 16 #include "components/content_settings/core/browser/content_settings_rule.h" |
| 17 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 19 #include "components/content_settings/core/common/content_settings_pattern.h" | 18 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 20 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 21 | 20 |
| 22 namespace { | 21 namespace { |
| 23 | 22 |
| 24 // The names of the ContentSettingsType values, for use with dictionary prefs. | 23 // The names of the ContentSettingsType values, for use with dictionary prefs. |
| 25 const char* kTypeNames[] = { | 24 const char* kTypeNames[] = { |
| 26 "cookies", | 25 "cookies", |
| 27 "images", | 26 "images", |
| 28 "javascript", | 27 "javascript", |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 242 |
| 244 void GetRendererContentSettingRules(const HostContentSettingsMap* map, | 243 void GetRendererContentSettingRules(const HostContentSettingsMap* map, |
| 245 RendererContentSettingRules* rules) { | 244 RendererContentSettingRules* rules) { |
| 246 map->GetSettingsForOneType( | 245 map->GetSettingsForOneType( |
| 247 CONTENT_SETTINGS_TYPE_IMAGES, std::string(), &(rules->image_rules)); | 246 CONTENT_SETTINGS_TYPE_IMAGES, std::string(), &(rules->image_rules)); |
| 248 map->GetSettingsForOneType( | 247 map->GetSettingsForOneType( |
| 249 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &(rules->script_rules)); | 248 CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &(rules->script_rules)); |
| 250 } | 249 } |
| 251 | 250 |
| 252 } // namespace content_settings | 251 } // namespace content_settings |
| OLD | NEW |