chromium/components/content_settings/core/common/content_settings_utils.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/content_settings/core/common/content_settings_utils.h"

#include <memory>

#include "base/values.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace content_settings {

namespace {

// Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes
// a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT|
// is encoded as a NULL value, so it is not allowed as an integer value.
bool ParseContentSettingValue(const base::Value& value,
                              ContentSetting* setting) {}

}  // namespace

ContentSetting ValueToContentSetting(const base::Value& value) {}

base::Value ContentSettingToValue(ContentSetting setting) {}

std::unique_ptr<base::Value> ToNullableUniquePtrValue(base::Value value) {}

base::Value FromNullableUniquePtrValue(std::unique_ptr<base::Value> value) {}

bool PatternAppliesToSingleOrigin(
    const ContentSettingsPattern& primary_pattern,
    const ContentSettingsPattern& secondary_pattern) {}

}  // namespace content_settings