| Index: components/content_settings/core/common/embedder_variables.cc
|
| diff --git a/components/content_settings/core/common/embedder_variables.cc b/components/content_settings/core/common/embedder_variables.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6be9d7e2c73aff6e6e75ed9dbc2811c212908f19
|
| --- /dev/null
|
| +++ b/components/content_settings/core/common/embedder_variables.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
| +// 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/embedder_variables.h"
|
| +
|
| +#include "base/logging.h"
|
| +
|
| +namespace content_settings {
|
| +
|
| +// The component supports only one scheme for simplicity.
|
| +const char* non_port_non_domain_wildcard_scheme = NULL;
|
| +
|
| +void SetNonWildcardDomainNonPortScheme(const char* scheme) {
|
| + DCHECK(scheme);
|
| + DCHECK(!non_port_non_domain_wildcard_scheme ||
|
| + non_port_non_domain_wildcard_scheme == scheme);
|
| + non_port_non_domain_wildcard_scheme = scheme;
|
| +}
|
| +
|
| +bool IsNonWildcardDomainNonPortScheme(const std::string& scheme) {
|
| + DCHECK(non_port_non_domain_wildcard_scheme);
|
| + return scheme == non_port_non_domain_wildcard_scheme;
|
| +}
|
| +
|
| +} // namespace content_settings
|
|
|