| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // NB: Modelled after Mozilla's code (originally written by Pamela Greene, | 5 // NB: Modelled after Mozilla's code (originally written by Pamela Greene, |
| 6 // later modified by others), but almost entirely rewritten for Chrome. | 6 // later modified by others), but almost entirely rewritten for Chrome. |
| 7 // (netwerk/dns/src/nsEffectiveTLDService.cpp) | 7 // (netwerk/dns/src/nsEffectiveTLDService.cpp) |
| 8 /* ***** BEGIN LICENSE BLOCK ***** | 8 /* ***** BEGIN LICENSE BLOCK ***** |
| 9 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 9 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 10 * | 10 * |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 46 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 47 | 47 |
| 48 #include "base/logging.h" | 48 #include "base/logging.h" |
| 49 #include "base/strings/string_util.h" | 49 #include "base/strings/string_util.h" |
| 50 #include "base/strings/utf_string_conversions.h" | 50 #include "base/strings/utf_string_conversions.h" |
| 51 #include "net/base/net_module.h" | 51 #include "net/base/net_module.h" |
| 52 #include "net/base/net_util.h" | 52 #include "net/base/net_util.h" |
| 53 #include "url/gurl.h" | 53 #include "url/gurl.h" |
| 54 #include "url/url_parse.h" | 54 #include "url/url_parse.h" |
| 55 | 55 |
| 56 // gperf intentionally uses fallthroughs. |
| 57 #pragma clang diagnostic push |
| 58 #pragma clang diagnostic ignored "-Wimplicit-fallthrough" |
| 56 #include "effective_tld_names.cc" | 59 #include "effective_tld_names.cc" |
| 60 #pragma clang diagnostic pop |
| 57 | 61 |
| 58 namespace net { | 62 namespace net { |
| 59 namespace registry_controlled_domains { | 63 namespace registry_controlled_domains { |
| 60 | 64 |
| 61 namespace { | 65 namespace { |
| 62 | 66 |
| 63 const int kExceptionRule = 1; | 67 const int kExceptionRule = 1; |
| 64 const int kWildcardRule = 2; | 68 const int kWildcardRule = 2; |
| 65 const int kPrivateRule = 4; | 69 const int kPrivateRule = 4; |
| 66 | 70 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 } | 269 } |
| 266 | 270 |
| 267 void SetFindDomainFunctionAndStringPoolForTesting(FindDomainPtr function, | 271 void SetFindDomainFunctionAndStringPoolForTesting(FindDomainPtr function, |
| 268 const char* stringpool) { | 272 const char* stringpool) { |
| 269 g_find_domain_function = function ? function : kDefaultFindDomainFunction; | 273 g_find_domain_function = function ? function : kDefaultFindDomainFunction; |
| 270 g_stringpool = stringpool ? stringpool : kDefaultStringPool; | 274 g_stringpool = stringpool ? stringpool : kDefaultStringPool; |
| 271 } | 275 } |
| 272 | 276 |
| 273 } // namespace registry_controlled_domains | 277 } // namespace registry_controlled_domains |
| 274 } // namespace net | 278 } // namespace net |
| OLD | NEW |