OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 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 #include "components/content_settings/core/common/embedder_variables.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace content_settings { |
| 10 |
| 11 // The component supports only one scheme for simplicity. |
| 12 const char* non_port_non_domain_wildcard_scheme = NULL; |
| 13 |
| 14 void SetNonWildcardDomainNonPortScheme(const char* scheme) { |
| 15 DCHECK(scheme); |
| 16 DCHECK(!non_port_non_domain_wildcard_scheme || |
| 17 non_port_non_domain_wildcard_scheme == scheme); |
| 18 non_port_non_domain_wildcard_scheme = scheme; |
| 19 } |
| 20 |
| 21 bool IsNonWildcardDomainNonPortScheme(const std::string& scheme) { |
| 22 DCHECK(non_port_non_domain_wildcard_scheme); |
| 23 return scheme == non_port_non_domain_wildcard_scheme; |
| 24 } |
| 25 |
| 26 } // namespace content_settings |
OLD | NEW |