OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_UTILS_H_ |
| 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_UTILS_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "components/content_settings/core/common/content_settings.h" |
| 11 |
| 12 namespace base { |
| 13 class Value; |
| 14 } |
| 15 |
| 16 namespace content_settings { |
| 17 |
| 18 // Converts |value| to |ContentSetting|. |
| 19 ContentSetting ValueToContentSetting(const base::Value* value); |
| 20 |
| 21 // Returns a base::Value representation of |setting| if |setting| is |
| 22 // a valid content setting. Otherwise, returns a nullptr. |
| 23 std::unique_ptr<base::Value> ContentSettingToValue(ContentSetting setting); |
| 24 |
| 25 } // namespace content_settings |
| 26 |
| 27 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_UTILS_H_ |
OLD | NEW |