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

Side by Side Diff: net/base/registry_controlled_domains/registry_controlled_domain.h

Issue 197183002: Reduce footprint of registry controlled domain table (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed shebang and execution bits Created 6 years, 7 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
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.h) 7 // (netwerk/dns/src/nsEffectiveTLDService.h)
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 PrivateRegistryFilter private_filter); 219 PrivateRegistryFilter private_filter);
220 220
221 // Like the GURL version, but takes a host (which is canonicalized internally) 221 // Like the GURL version, but takes a host (which is canonicalized internally)
222 // instead of a full GURL. 222 // instead of a full GURL.
223 NET_EXPORT size_t GetRegistryLength(const std::string& host, 223 NET_EXPORT size_t GetRegistryLength(const std::string& host,
224 UnknownRegistryFilter unknown_filter, 224 UnknownRegistryFilter unknown_filter,
225 PrivateRegistryFilter private_filter); 225 PrivateRegistryFilter private_filter);
226 226
227 typedef const struct DomainRule* (*FindDomainPtr)(const char *, unsigned int); 227 typedef const struct DomainRule* (*FindDomainPtr)(const char *, unsigned int);
228 228
229 // Used for unit tests, so that a different perfect hash map from the full 229 // Used for unit tests. Use default domains.
230 // list is used. Set to NULL to use the Default function. 230 NET_EXPORT_PRIVATE void SetFindDomainGraph();
231 NET_EXPORT_PRIVATE void SetFindDomainFunctionAndStringPoolForTesting(
232 FindDomainPtr fn, const char* stringpool);
233 231
232 // Used for unit tests, so that a frozen list of domains is used.
233 NET_EXPORT_PRIVATE void SetFindDomainGraph(const unsigned char* domains,
234 size_t length);
234 } // namespace registry_controlled_domains 235 } // namespace registry_controlled_domains
235 } // namespace net 236 } // namespace net
236 237
237 #endif // NET_BASE_REGISTRY_CONTROLLED_DOMAINS_REGISTRY_CONTROLLED_DOMAIN_H_ 238 #endif // NET_BASE_REGISTRY_CONTROLLED_DOMAINS_REGISTRY_CONTROLLED_DOMAIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698