Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Side by Side Diff: components/content_settings/core/common/content_settings_utils.h

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: rebased Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698