| 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/common/content_settings_types.h" | 9 #include "components/content_settings/core/common/content_settings_types.h" |
| 10 | 10 |
| 11 namespace content_settings { | 11 namespace content_settings { |
| 12 | 12 |
| 13 base::Value* GetContentSettingValue(const ProviderInterface* provider, | 13 base::Value* GetContentSettingValue(const ProviderInterface* provider, |
| 14 const GURL& primary_url, | 14 const GURL& primary_url, |
| 15 const GURL& secondary_url, | 15 const GURL& secondary_url, |
| 16 ContentSettingsType content_type, | 16 ContentSettingsType content_type, |
| 17 const std::string& resource_identifier, | 17 const std::string& resource_identifier, |
| 18 bool include_incognito) { | 18 bool include_incognito) { |
| 19 return GetContentSettingValueAndPatterns(provider, primary_url, secondary_url, | 19 return GetContentSettingValueAndPatterns(provider, primary_url, secondary_url, |
| 20 content_type, resource_identifier, | 20 content_type, resource_identifier, |
| 21 include_incognito, NULL, NULL); | 21 include_incognito, NULL, |
| 22 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 |