xref: /aosp_15_r20/external/cronet/net/tools/tld_cleanup/README (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard WorkerWhen updating src/net/base/registry_controlled_domains/effective_tld_names.dat:
2*6777b538SAndroid Build Coastguard Worker
3*6777b538SAndroid Build Coastguard Worker1. Obtain the new effective_tld_names.dat, probably by downloading
4*6777b538SAndroid Build Coastguard Worker   https://publicsuffix.org/list/public_suffix_list.dat
5*6777b538SAndroid Build Coastguard Worker
6*6777b538SAndroid Build Coastguard Worker2. Remove whitespace from the ends of the lines.
7*6777b538SAndroid Build Coastguard Worker   You could possibly use something like:
8*6777b538SAndroid Build Coastguard Worker     sed -i -e "s/\s*$//g" \
9*6777b538SAndroid Build Coastguard Worker         src/net/base/registry_controlled_domains/effective_tld_names.dat
10*6777b538SAndroid Build Coastguard Worker
11*6777b538SAndroid Build Coastguard Worker3. Add the Chromium note back in just after the license at the top, and just
12*6777b538SAndroid Build Coastguard Worker   before '===BEGIN ICANN DOMAINS==='. Ensure there is an empty line above and
13*6777b538SAndroid Build Coastguard Worker   two empty lines below the note. The note should say:
14*6777b538SAndroid Build Coastguard Worker// Chromium note: this is based on Mozilla's file:
15*6777b538SAndroid Build Coastguard Worker// https://publicsuffix.org/list/public_suffix_list.dat
16*6777b538SAndroid Build Coastguard Worker
17*6777b538SAndroid Build Coastguard Worker4. Diff the changes and restore any changes annotated with a "// CHROMIUM"
18*6777b538SAndroid Build Coastguard Worker   comment.
19*6777b538SAndroid Build Coastguard Worker
20*6777b538SAndroid Build Coastguard Worker5. Build tld_cleanup (the "(net)" > "tld_cleanup" project)
21*6777b538SAndroid Build Coastguard Worker
22*6777b538SAndroid Build Coastguard Worker6. Run it (no arguments needed), typically from src/build/Release or
23*6777b538SAndroid Build Coastguard Worker   src/build/Debug. It will re-generate
24*6777b538SAndroid Build Coastguard Worker   src/net/base/registry_controlled_domains/effective_tld_names.gperf.
25*6777b538SAndroid Build Coastguard Worker
26*6777b538SAndroid Build Coastguard Worker7. Check in the updated effective_tld_names.dat, effective_tld_names.gperf
27*6777b538SAndroid Build Coastguard Worker
28*6777b538SAndroid Build Coastguard WorkerNote that gperf is no longer used for effective_tld_names, but when building
29*6777b538SAndroid Build Coastguard Workerchromium the file effective_tld_names.gperf will be parsed by make_dafsa.py
30*6777b538SAndroid Build Coastguard Workerto generate the file effective_tld_names-inc.cc, which is included in
31*6777b538SAndroid Build Coastguard Workerregistry_controlled_domain.cc
32