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/test/content_settings_test_utils.h" | 5 #include "components/content_settings/core/test/content_settings_test_utils.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "components/content_settings/core/browser/host_content_settings_map.h" |
9 #include "components/content_settings/core/common/content_settings_types.h" | 10 #include "components/content_settings/core/common/content_settings_types.h" |
10 | 11 |
11 namespace content_settings { | 12 namespace content_settings { |
12 | 13 |
13 base::Value* GetContentSettingValue(const ProviderInterface* provider, | 14 base::Value* GetContentSettingValue(const ProviderInterface* provider, |
14 const GURL& primary_url, | 15 const GURL& primary_url, |
15 const GURL& secondary_url, | 16 const GURL& secondary_url, |
16 ContentSettingsType content_type, | 17 ContentSettingsType content_type, |
17 const std::string& resource_identifier, | 18 const std::string& resource_identifier, |
18 bool include_incognito) { | 19 bool include_incognito) { |
19 return GetContentSettingValueAndPatterns(provider, primary_url, secondary_url, | 20 return HostContentSettingsMap::GetContentSettingValueAndPatternsInternal( |
20 content_type, resource_identifier, | 21 provider, primary_url, secondary_url, content_type, resource_identifier, |
21 include_incognito, NULL, NULL); | 22 include_incognito, NULL, NULL).release(); |
22 } | 23 } |
23 | 24 |
24 ContentSetting GetContentSetting(const ProviderInterface* provider, | 25 ContentSetting GetContentSetting(const ProviderInterface* provider, |
25 const GURL& primary_url, | 26 const GURL& primary_url, |
26 const GURL& secondary_url, | 27 const GURL& secondary_url, |
27 ContentSettingsType content_type, | 28 ContentSettingsType content_type, |
28 const std::string& resource_identifier, | 29 const std::string& resource_identifier, |
29 bool include_incognito) { | 30 bool include_incognito) { |
30 scoped_ptr<base::Value> value( | 31 scoped_ptr<base::Value> value( |
31 GetContentSettingValue(provider, primary_url, secondary_url, content_type, | 32 GetContentSettingValue(provider, primary_url, secondary_url, content_type, |
32 resource_identifier, include_incognito)); | 33 resource_identifier, include_incognito)); |
33 return ValueToContentSetting(value.get()); | 34 return ValueToContentSetting(value.get()); |
34 } | 35 } |
35 | 36 |
36 } // namespace content_settings | 37 } // namespace content_settings |
OLD | NEW |