summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRobert Hogan <robert@roberthogan.net>2011-05-24 11:04:27 +0200
committerPeter Hartmann <peter.hartmann@nokia.com>2011-05-24 12:12:04 +0200
commit093a92fb03e7c163882d1ba5fbdaf9fabb5bd969 (patch)
tree5b67504e44e34abdd0c1dfc69c73bd8118e6a40b /util
parent6c72eb845657b670af5435ef8084ae91e5dfbbdd (diff)
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> (cherry picked from commit 154402f56dcf8303a6ce601a52215226af8d31ba)
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 5cdc97cd0c..baaf25632c 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 9d5f1cf7f9..9d5f1cf7f9 100644
--- a/util/network/cookiejar-generateTLDs/cookiejar-generateTLDs.pro
+++ b/util/corelib/qurl-generateTLDs/qurl-generateTLDs.pro