summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRobert Hogan <robert@roberthogan.net>2011-05-24 09:04:27 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2011-05-24 09:47:16 (GMT)
commit154402f56dcf8303a6ce601a52215226af8d31ba (patch)
treea3a84d06e6c80812b55304031ba605d6aea46c63 /util
parent83c37059df7f23be482d4ecb2c54603a3665a33d (diff)
downloadQt-154402f56dcf8303a6ce601a52215226af8d31ba.zip
Qt-154402f56dcf8303a6ce601a52215226af8d31ba.tar.gz
Qt-154402f56dcf8303a6ce601a52215226af8d31ba.tar.bz2
Add QUrl::topLevelDomain() and move TLD table from QtNetwork to QtCore
Move Qt's copy of the Mozilla public suffix list from QtNetwork to QtCore and use it to expose a new API function QUrl::topLevelDomain(). This function returns the section of the url that is a registrar-controlled top level domain. QtCore now exports a couple of functions to the other Qt modules: qTopLevelDomain, a helper function for QUrl::topLevelDomain(); and qIsEffectiveTLD(), a helper function for QNetworkCookeieJar. The motivation for this new API is to allow QtWebKit implement a Third-Party Cookie blocking policy. For this QtWebKit needs to know the element of the url that is the registry-controlled TLD. Without this knowledge it would end up blocking third-party cookies per host rather than per registry-controlled domain. See also https://bugs.webkit.org/show_bug.cgi?id=45455 Merge-request: 1205 Task-number: QTBUG-13601 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Diffstat (limited to 'util')
-rw-r--r--util/corelib/qurl-generateTLDs/main.cpp (renamed from util/network/cookiejar-generateTLDs/main.cpp)4
-rw-r--r--util/corelib/qurl-generateTLDs/qurl-generateTLDs.pro (renamed from util/network/cookiejar-generateTLDs/cookiejar-generateTLDs.pro)0
2 files changed, 2 insertions, 2 deletions
diff --git a/util/network/cookiejar-generateTLDs/main.cpp b/util/corelib/qurl-generateTLDs/main.cpp
index 5cdc97c..baaf256 100644
--- a/util/network/cookiejar-generateTLDs/main.cpp
+++ b/util/corelib/qurl-generateTLDs/main.cpp
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
printf(" wget http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1 -O effective_tld_names.dat\n");
printf(" grep '^[^\\/\\/]' effective_tld_names.dat > effective_tld_names.dat.trimmed\n");
printf(" %s effective_tld_names.dat.trimmed effective_tld_names.dat.qt\n\n", argv[0]);
- printf("Now copy the data from effective_tld_names.dat.qt to the file src/network/access/qnetworkcookiejartlds_p.h in your Qt repo\n\n");
+ printf("Now copy the data from effective_tld_names.dat.qt to the file src/corelib/io/qurltlds_p.h in your Qt repo\n\n");
exit(1);
}
QFile file(argv[1]);
@@ -156,6 +156,6 @@ int main(int argc, char **argv) {
outFile.write(outDataBufferBA);
outFile.write("};\n");
outFile.close();
- printf("data generated to %s . Now copy the data from this file to src/network/access/qnetworkcookiejartlds_p.h in your Qt repo\n", argv[2]);
+ printf("data generated to %s . Now copy the data from this file to src/corelib/io/qurltlds_p.h in your Qt repo\n", argv[2]);
exit(0);
}
diff --git a/util/network/cookiejar-generateTLDs/cookiejar-generateTLDs.pro b/util/corelib/qurl-generateTLDs/qurl-generateTLDs.pro
index 9d5f1cf..9d5f1cf 100644
--- a/util/network/cookiejar-generateTLDs/cookiejar-generateTLDs.pro
+++ b/util/corelib/qurl-generateTLDs/qurl-generateTLDs.pro