Internal change PiperOrigin-RevId: 166338392 Change-Id: I364a3dfe5242bd4023b5ff2387cabb26111d48b4
diff --git a/import.sh b/import.sh index 5b2f397..618f181 100644 --- a/import.sh +++ b/import.sh
@@ -4,7 +4,7 @@ top=/tmp/chromium mkdir $top prefix=https://chromium.googlesource.com/chromium/src.git/+archive -for version in 58.0.3029.110 59.0.3071.115 +for version in 59.0.3071.115 60.0.3112.101 do mkdir $top/$version cd $top/$version
diff --git a/src/base/strings/string16.cc b/src/base/strings/string16.cc index 2e749a3..2139034 100644 --- a/src/base/strings/string16.cc +++ b/src/base/strings/string16.cc
@@ -4,7 +4,7 @@ #include "base/strings/string16.h" -#if defined(WCHAR_T_IS_UTF16) +#if defined(WCHAR_T_IS_UTF16) && !defined(_AIX) #error This file should not be used on 2-byte wchar_t systems // If this winds up being needed on 2-byte wchar_t systems, either the
diff --git a/src/base/strings/string_piece.h b/src/base/strings/string_piece.h index 340a341..6f45f71 100644 --- a/src/base/strings/string_piece.h +++ b/src/base/strings/string_piece.h
@@ -29,16 +29,13 @@ #include "base/logging.h" #include "base/strings/string16.h" +#include "base/strings/string_piece_forward.h" #define BASE_EXPORT namespace url { namespace base { -template <typename STRING_TYPE> class BasicStringPiece; -typedef BasicStringPiece<std::string> StringPiece; -typedef BasicStringPiece<string16> StringPiece16; - // internal -------------------------------------------------------------------- // Many of the StringPiece functions use different implementations for the
diff --git a/src/base/strings/string_piece_forward.h b/src/base/strings/string_piece_forward.h new file mode 100644 index 0000000..8a0ebc9 --- /dev/null +++ b/src/base/strings/string_piece_forward.h
@@ -0,0 +1,25 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Forward declaration of StringPiece types from base/strings/string_piece.h + +#ifndef BASE_STRINGS_STRING_PIECE_FORWARD_H_ +#define BASE_STRINGS_STRING_PIECE_FORWARD_H_ + +#include <string> + +#include "base/strings/string16.h" + +namespace url { +namespace base { + +template <typename STRING_TYPE> +class BasicStringPiece; +typedef BasicStringPiece<std::string> StringPiece; +typedef BasicStringPiece<string16> StringPiece16; + +} // namespace base +} // namespace url + +#endif // BASE_STRINGS_STRING_PIECE_FORWARD_H_
diff --git a/src/build/build_config.h b/src/build/build_config.h index b84a9d3..1f38fcc 100644 --- a/src/build/build_config.h +++ b/src/build/build_config.h
@@ -49,6 +49,8 @@ #endif #elif defined(_WIN32) #define OS_WIN 1 +#elif defined(__Fuchsia__) +#define OS_FUCHSIA 1 #elif defined(__FreeBSD__) #define OS_FREEBSD 1 #elif defined(__NetBSD__) @@ -59,6 +61,8 @@ #define OS_SOLARIS 1 #elif defined(__QNXNTO__) #define OS_QNX 1 +#elif defined(_AIX) +#define OS_AIX 1 #else #error Please add support for your platform in build/build_config.h #endif @@ -75,10 +79,10 @@ // For access to standard POSIXish features, use OS_POSIX instead of a // more specific macro. -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \ - defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_SOLARIS) || \ - defined(OS_ANDROID) || defined(OS_OPENBSD) || defined(OS_SOLARIS) || \ - defined(OS_ANDROID) || defined(OS_NACL) || defined(OS_QNX) +#if defined(OS_AIX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ + defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_MACOSX) || \ + defined(OS_NACL) || defined(OS_NETBSD) || defined(OS_OPENBSD) || \ + defined(OS_QNX) || defined(OS_SOLARIS) #define OS_POSIX 1 #endif @@ -121,21 +125,16 @@ #define ARCH_CPU_S390 1 #define ARCH_CPU_31_BITS 1 #define ARCH_CPU_BIG_ENDIAN 1 -#elif defined(__PPC64__) && defined(__BIG_ENDIAN__) +#elif (defined(__PPC64__) || defined(__PPC__)) && defined(__BIG_ENDIAN__) #define ARCH_CPU_PPC64_FAMILY 1 #define ARCH_CPU_PPC64 1 #define ARCH_CPU_64_BITS 1 #define ARCH_CPU_BIG_ENDIAN 1 -#elif defined(__PPC64__) && defined(__LITTLE_ENDIAN__) +#elif defined(__PPC64__) #define ARCH_CPU_PPC64_FAMILY 1 #define ARCH_CPU_PPC64 1 #define ARCH_CPU_64_BITS 1 #define ARCH_CPU_LITTLE_ENDIAN 1 -#elif defined(__PPC__) -#define ARCH_CPU_PPC_FAMILY 1 -#define ARCH_CPU_PPC 1 -#define ARCH_CPU_32_BITS 1 -#define ARCH_CPU_BIG_ENDIAN 1 #elif defined(__ARMEL__) #define ARCH_CPU_ARM_FAMILY 1 #define ARCH_CPU_ARMEL 1 @@ -180,12 +179,10 @@ // Type detection for wchar_t. #if defined(OS_WIN) #define WCHAR_T_IS_UTF16 -#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ - defined(__WCHAR_MAX__) && \ +#elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \ (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff) #define WCHAR_T_IS_UTF32 -#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ - defined(__WCHAR_MAX__) && \ +#elif defined(OS_POSIX) && defined(COMPILER_GCC) && defined(__WCHAR_MAX__) && \ (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff) // On Posix, we'll detect short wchar_t, but projects aren't guaranteed to // compile in this mode (in particular, Chrome doesn't). This is intended for
diff --git a/src/net/base/registry_controlled_domains/effective_tld_names.dat b/src/net/base/registry_controlled_domains/effective_tld_names.dat index 7598355..1157a7f 100644 --- a/src/net/base/registry_controlled_domains/effective_tld_names.dat +++ b/src/net/base/registry_controlled_domains/effective_tld_names.dat
@@ -171,7 +171,7 @@ // aq : https://en.wikipedia.org/wiki/.aq aq -// ar : https://nic.ar/normativa-vigente.xhtml +// ar : https://nic.ar/nic-argentina/normativa-vigente ar com.ar edu.ar @@ -179,6 +179,7 @@ gov.ar int.ar mil.ar +musica.ar net.ar org.ar tur.ar @@ -406,6 +407,7 @@ art.br ato.br b.br +belem.br bio.br blog.br bmd.br @@ -414,6 +416,8 @@ cnt.br com.br coop.br +cri.br +def.br ecn.br eco.br edu.br @@ -424,6 +428,7 @@ eti.br far.br flog.br +floripa.br fm.br fnd.br fot.br @@ -431,9 +436,38 @@ g12.br ggf.br gov.br +// gov.br 26 states + df https://en.wikipedia.org/wiki/States_of_Brazil +ac.gov.br +al.gov.br +am.gov.br +ap.gov.br +ba.gov.br +ce.gov.br +df.gov.br +es.gov.br +go.gov.br +ma.gov.br +mg.gov.br +ms.gov.br +mt.gov.br +pa.gov.br +pb.gov.br +pe.gov.br +pi.gov.br +pr.gov.br +rj.gov.br +rn.gov.br +ro.gov.br +rr.gov.br +rs.gov.br +sc.gov.br +se.gov.br +sp.gov.br +to.gov.br imb.br ind.br inf.br +jampa.br jor.br jus.br leg.br @@ -449,6 +483,7 @@ ntr.br odo.br org.br +poa.br ppg.br pro.br psc.br @@ -456,6 +491,7 @@ qsl.br radio.br rec.br +recife.br slg.br srv.br taxi.br @@ -465,6 +501,7 @@ tur.br tv.br vet.br +vix.br vlog.br wiki.br zlg.br @@ -4406,6 +4443,7 @@ // nc : http://www.cctld.nc/ nc asso.nc +nom.nc // ne : https://en.wikipedia.org/wiki/.ne ne @@ -6555,6 +6593,9 @@ // xn--54b7fta0cc ("Bangla", Bangla) : BD বাংলা +// xn--90ae ("bg", Bulgarian) : BG +бг + // xn--90ais ("bel", Belarusian/Russian Cyrillic) : BY // Operated by .by registry бел @@ -6590,6 +6631,34 @@ // https://www2.hkirc.hk/register/rules.jsp 香港 +// xn--2scrj9c ("Bharat", Kannada) : IN +// India +ಭಾರತ + +// xn--3hcrj9c ("Bharat", Oriya) : IN +// India +ଭାରତ + +// xn--45br5cyl ("Bharatam", Assamese) : IN +// India +ভাৰত + +// xn--h2breg3eve ("Bharatam", Sanskrit) : IN +// India +भारतम् + +// xn--h2brj9c8c ("Bharot", Santali) : IN +// India +भारोत + +// xn--mgbgu82a ("Bharat", Sindhi) : IN +// India +ڀارت + +// xn--rvc1e0am3e ("Bharatam", Malayalam) : IN +// India +ഭാരതം + // xn--h2brj9c ("Bharat", Devanagari) : IN // India भारत @@ -6731,6 +6800,12 @@ // xn--o3cw4h ("Thai", Thai) : TH // http://www.thnic.co.th ไทย +ศึกษา.ไทย +ธุรกิจ.ไทย +รัฐบาล.ไทย +ทหาร.ไทย +เน็ต.ไทย +องค์กร.ไทย // xn--pgbs0dh ("Tunisia", Arabic) : TN // http://nic.tn @@ -9039,9 +9114,6 @@ // organic : 2014-03-27 Afilias Limited organic -// orientexpress : 2015-02-05 -orientexpress - // origins : 2015-10-01 The Estée Lauder Companies Inc. origins @@ -10478,6 +10550,12 @@ // ===BEGIN PRIVATE DOMAINS=== // (Note: these are in alphabetical order by company name) +// 1GB LLC : https://www.1gb.ua/ +// Submitted by 1GB LLC <noc@1gb.com.ua> +cc.ua +inf.ua +ltd.ua + // Agnat sp. z o.o. : https://domena.pl // Submitted by Przemyslaw Plewa <it-admin@domena.pl> beep.pl @@ -10495,7 +10573,7 @@ // Submitted by Donavan Miller <donavanm@amazon.com> cloudfront.net -// Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/ +// Amazon Elastic Compute Cloud : https://aws.amazon.com/ec2/ // Submitted by Luke Wells <psl-maintainers@amazon.com> *.compute.amazonaws.com *.compute-1.amazonaws.com @@ -10610,15 +10688,28 @@ // Submitted by Nathan O'Sullivan <nathan@mammoth.com.au> bnr.la +// Boomla : https://boomla.com +// Submitted by Tibor Halter <thalter@boomla.com> +boomla.net + // Boxfuse : https://boxfuse.com // Submitted by Axel Fontaine <axel@boxfuse.com> boxfuse.io +// bplaced : https://www.bplaced.net/ +// Submitted by Miroslav Bozic <security@bplaced.net> +square7.ch +bplaced.com +bplaced.de +square7.de +bplaced.net +square7.net + // BrowserSafetyMark // Submitted by Dave Tharp <browsersafetymark.io@quicinc.com> browsersafetymark.io -// callidomus: https://www.callidomus.com/ +// callidomus : https://www.callidomus.com/ // Submitted by Marcus Popp <admin@callidomus.com> mycd.eu @@ -10692,6 +10783,14 @@ // Submitted by Khash Sajadi <khash@cloud66.com> c66.me +// CloudAccess.net : https://www.cloudaccess.net/ +// Submitted by Pawel Panek <noc@cloudaccess.net> +jdevcloud.com +wpdevcloud.com +cloudaccess.host +freesite.host +cloudaccess.net + // cloudControl : https://www.cloudcontrol.com/ // Submitted by Tobias Wilken <tw@cloudcontrol.com> cloudcontrolled.com @@ -10730,12 +10829,7 @@ co.nl co.no -// Commerce Guys, SAS -// Submitted by Damien Tournoud <damien@commerceguys.com> -// CHROMIUM - Disabled as per https://code.google.com/p/chromium/issues/detail?id=459802 -// *.platform.sh - -// COSIMO GmbH http://www.cosimo.de +// COSIMO GmbH : http://www.cosimo.de // Submitted by Rene Marticke <rmarticke@cosimo.de> dyn.cosidns.de dynamisches-dns.de @@ -10785,6 +10879,10 @@ // Submitted by Norbert Auler <mail@dnshome.de> dnshome.de +// DrayTek Corp. : https://www.draytek.com/ +// Submitted by Paul Fang <mis@draytek.com> +drayddns.com + // DreamHost : http://www.dreamhost.com/ // Submitted by Andrew Farmer <andrew.farmer@dreamhost.com> dreamhosters.com @@ -11100,14 +11198,43 @@ myhome-server.de ddnss.org +// Definima : http://www.definima.com/ +// Submitted by Maxence Bitterli <maxence@definima.com> +definima.net +definima.io + +// Dynu.com : https://www.dynu.com/ +// Submitted by Sue Ye <sue@dynu.com> +ddnsfree.com +ddnsgeek.com +giize.com +gleeze.com +kozow.com +loseyourip.com +ooguy.com +theworkpc.com +casacam.net +dynu.net +accesscam.org +camdvr.org +freeddns.org +mywire.org +webredirect.org +myddns.rocks +blogsite.xyz + // dynv6 : https://dynv6.com -// Submitted by Dominik Menke <dom@digineo.de> 2016-01-18 +// Submitted by Dominik Menke <dom@digineo.de> dynv6.net // E4YOU spol. s.r.o. : https://e4you.cz/ // Submitted by Vladimir Dudr <info@e4you.cz> e4.cz +// Enalean SAS: https://www.enalean.com +// Submitted by Thomas Cottier <thomas.cottier@enalean.com> +mytuleap.com + // Enonic : http://enonic.com/ // Submitted by Erik Kaareng-Sunde <esu@enonic.com> enonic.io @@ -11177,9 +11304,19 @@ eu-1.evennode.com eu-2.evennode.com eu-3.evennode.com +eu-4.evennode.com us-1.evennode.com us-2.evennode.com us-3.evennode.com +us-4.evennode.com + +// eDirect Corp. : https://hosting.url.com.tw/ +// Submitted by C.S. chang <cschang@corp.url.com.tw> +twmail.cc +twmail.net +twmail.org +mymailer.com.tw +url.tw // Facebook, Inc. // Submitted by Peter Ruibal <public-suffix@fb.com> @@ -11283,6 +11420,10 @@ fedorapeople.org cloud.fedoraproject.org +// Filegear Inc. : https://www.filegear.com +// Submitted by Jason Zhu <jason@owtware.com> +filegear.me + // Firebase, Inc. // Submitted by Chris Raynor <chris@firebase.com> firebaseapp.com @@ -11290,6 +11431,7 @@ // Flynn : https://flynn.io // Submitted by Jonathan Rudenberg <jonathan@flynn.io> flynnhub.com +flynnhosting.net // Freebox : http://www.freebox.fr // Submitted by Romain Fliedel <rfliedel@freebox.fr> @@ -11320,11 +11462,6 @@ // Submitted by Patrick Toomey <security@github.com> github.io githubusercontent.com -githubcloud.com -*.api.githubcloud.com -*.ext.githubcloud.com -gist.githubcloud.com -*.githubcloudusercontent.com // GitLab, Inc. // Submitted by Alex Hanselka <alex@gitlab.com> @@ -11422,6 +11559,7 @@ blogspot.ug blogspot.vn cloudfunctions.net +cloud.goog codespot.com googleapis.com googlecode.com @@ -11458,6 +11596,10 @@ biz.at info.at +// info.cx : http://info.cx +// Submitted by Jacob Slater <whois@igloo.to> +info.cx + // Interlegis : http://www.interlegis.leg.br // Submitted by Gabriel Ferreira <registrobr@interlegis.leg.br> ac.leg.br @@ -11513,10 +11655,40 @@ co.krd edu.krd +// LCube - Professional hosting e.K. : https://www.lcube-webhosting.de +// Submitted by Lars Laehn <info@lcube.de> +git-repos.de +lcube-server.de +svn-repos.de + +// LiquidNet Ltd : http://www.liquidnetlimited.com/ +// Submitted by Victor Velchev <admin@liquidnetlimited.com> +we.bs + +// Lukanet Ltd : https://lukanet.com +// Submitted by Anton Avramov <register@lukanet.com> +barsy.bg +barsyonline.com +barsy.de +barsy.eu +barsy.in +barsy.net +barsy.online +barsy.support + // Magento Commerce // Submitted by Damien Tournoud <dtournoud@magento.cloud> *.magentosite.cloud +// Mail.Ru Group : https://hb.cldmail.ru +// Submitted by Ilya Zaretskiy <zaretskiy@corp.mail.ru> +hb.cldmail.ru + +// MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/ +// Submitted by Zdeněk Šustr <zdenek.sustr@cesnet.cz> +cloud.metacentrum.cz +custom.metacentrum.cz + // Meteor Development Group : https://www.meteor.com/hosting // Submitted by Pierre Carrier <pierre@meteor.com> meteorapp.com @@ -11535,6 +11707,11 @@ // Submitted by glob <glob@mozilla.com> bmoattachments.org +// Netlify : https://www.netlify.com +// Submitted by Jessica Parsons <jessica@netlify.com> +bitballoon.com +netlify.com + // Neustar Inc. // Submitted by Trung Tran <Trung.Tran@neustar.biz> 4u.com @@ -11640,10 +11817,59 @@ webhop.me zapto.org +// NodeArt : https://nodeart.io +// Submitted by Konstantin Nosov <Nosov@nodeart.io> +stage.nodeart.io + +// Nodum B.V. : https://nodum.io/ +// Submitted by Wietse Wind <hello+publicsuffixlist@nodum.io> +nodum.co +nodum.io + // NYC.mn : http://www.information.nyc.mn // Submitted by Matthew Brown <mattbrown@nyc.mn> nyc.mn +// NymNom : https://nymnom.com/ +// Submitted by Dave McCormack <dave.mccormack@nymnom.com> +nom.ae +nom.ai +nom.al +nym.by +nym.bz +nom.cl +nom.gd +nom.gl +nym.gr +nom.gt +nom.hn +nom.im +nym.kz +nym.la +nom.li +nym.li +nym.lt +nym.lu +nym.me +nom.mk +nym.mx +nom.nu +nym.nz +nym.pe +nym.pt +nom.pw +nom.qa +nom.rs +nom.si +nym.sk +nym.su +nym.sx +nym.tw +nom.ug +nom.uy +nom.vc +nom.vg + // Octopodal Solutions, LLC. : https://ulterius.io/ // Submitted by Andrew Sampson <andrew@ulterius.io> cya.gg @@ -11701,6 +11927,12 @@ // Submitted by Frédéric VANNIÈRE <f.vanniere@planet-work.com> on-web.fr +// Platform.sh : https://platform.sh +// Submitted by Nikola Kotur <nikola@platform.sh> +// CHROMIUM - Disabled as per https://code.google.com/p/chromium/issues/detail?id=459802 +// *.platform.sh +*.platformsh.site + // prgmr.com : https://prgmr.com/ // Submitted by Sarah Newman <owner@prgmr.com> xen.prgmr.com @@ -11727,6 +11959,15 @@ alpha-myqnapcloud.com myqnapcloud.com +// Quip : https://quip.com +// Submitted by Patrick Linehan <plinehan@quip.com> +*.quipelements.com + +// Qutheory LLC : http://qutheory.io +// Submitted by Jonas Schwartz <jonas@qutheory.io> +vapor.cloud +vaporcloud.io + // Rackmaze LLC : https://www.rackmaze.com // Submitted by Kirill Pertsev <kika@rackmaze.com> rackmaze.com @@ -11768,6 +12009,10 @@ myfirewall.org spdns.org +// SensioLabs, SAS : https://sensiolabs.com/ +// Submitted by Fabien Potencier <fabien.potencier@sensiolabs.com> +*.sensiosite.cloud + // Service Online LLC : http://drs.ua/ // Submitted by Serhii Bulakh <support@drs.ua> biz.ua @@ -11819,6 +12064,10 @@ // Submitted by Philip Hutchins <hostmaster@storj.io> storj.farm +// Sub 6 Limited: http://www.sub6.com +// Submitted by Dan Miller <dm@sub6.com> +temp-dns.com + // Synology, Inc. : https://www.synology.com/ // Submitted by Rony Weng <ronyweng@synology.com> diskstation.me @@ -11847,11 +12096,40 @@ med.pl sopot.pl +// Thingdust AG : https://thingdust.com/ +// Submitted by Adrian Imboden <adi@thingdust.com> +cust.dev.thingdust.io +cust.disrec.thingdust.io +cust.prod.thingdust.io +cust.testing.thingdust.io + // TownNews.com : http://www.townnews.com // Submitted by Dustin Ward <dward@townnews.com> bloxcms.com townnews-staging.com +// TrafficPlex GmbH : https://www.trafficplex.de/ +// Submitted by Phillipp Röll <phillipp.roell@trafficplex.de> +12hp.at +2ix.at +4lima.at +lima-city.at +12hp.ch +2ix.ch +4lima.ch +lima-city.ch +trafficplex.cloud +de.cool +12hp.de +2ix.de +4lima.de +lima-city.de +1337.pictures +clan.rip +lima-city.rocks +webspace.rocks +lima.zone + // TransIP : htts://www.transip.nl // Submitted by Rory Breuk <rbreuk@transip.nl> *.transurl.be @@ -11897,6 +12175,11 @@ // Submitted by Simon Kissel <hostmaster@viprinet.com> router.management +// WeDeploy by Liferay, Inc. : https://www.wedeploy.com +// Submitted by Henrique Vicente <security@wedeploy.com> +wedeploy.io +wedeploy.me + // Western Digital Technologies, Inc : https://www.wdc.com // Submitted by Jung Jin <jungseok.jin@wdc.com> remotewd.com @@ -11905,8 +12188,10 @@ // Submitted by Yuvi Panda <yuvipanda@wikimedia.org> wmflabs.org -// XS4ALL Internet bv: https://www.xs4all.nl/ +// XS4ALL Internet bv : https://www.xs4all.nl/ // Submitted by Daniel Mostertman <unixbeheer+publicsuffix@xs4all.net> +cistron.nl +demon.nl xs4all.space // Yola : https://www.yola.com/ @@ -11932,10 +12217,4 @@ // Submitted by Olli Vanhoja <olli@zeit.co> now.sh -// 1GB LLC : https://www.1gb.ua/ -// Submitted by 1GB LLC <noc@1gb.com.ua> -cc.ua -inf.ua -ltd.ua - // ===END PRIVATE DOMAINS===
diff --git a/src/net/base/registry_controlled_domains/effective_tld_names.gperf b/src/net/base/registry_controlled_domains/effective_tld_names.gperf index ba49a41..549579b 100644 --- a/src/net/base/registry_controlled_domains/effective_tld_names.gperf +++ b/src/net/base/registry_controlled_domains/effective_tld_names.gperf
@@ -14,12 +14,22 @@ 0.bg, 0 0emm.com, 6 1.bg, 0 +12hp.at, 4 +12hp.ch, 4 +12hp.de, 4 +1337.pictures, 4 1kapp.com, 4 2.bg, 0 2000.hu, 0 +2ix.at, 4 +2ix.ch, 4 +2ix.de, 4 3.bg, 0 3utilities.com, 4 4.bg, 0 +4lima.at, 4 +4lima.ch, 4 +4lima.de, 4 4u.com, 4 5.bg, 0 6.bg, 0 @@ -62,6 +72,7 @@ ac.cr, 0 ac.cy, 0 ac.gn, 0 +ac.gov.br, 0 ac.id, 0 ac.il, 0 ac.im, 0 @@ -98,6 +109,7 @@ academy, 0 academy.museum, 0 accenture, 0 +accesscam.org, 4 accident-investigation.aero, 0 accident-prevention.aero, 0 accountant, 0 @@ -205,6 +217,7 @@ akune.kagoshima.jp, 0 al, 0 al.eu.org, 4 +al.gov.br, 0 al.it, 0 al.leg.br, 4 al.no, 0 @@ -236,6 +249,7 @@ alwaysdata.net, 6 am, 0 am.br, 0 +am.gov.br, 0 am.leg.br, 4 ama.aichi.jp, 0 ama.shimane.jp, 0 @@ -297,11 +311,11 @@ aosta.it, 0 aostavalley.it, 0 aoste.it, 0 +ap.gov.br, 0 ap.gov.pl, 0 ap.it, 0 ap.leg.br, 4 apartments, 0 -api.githubcloud.com, 6 app, 0 appchizi.com, 4 apple, 0 @@ -488,6 +502,7 @@ b.se, 0 b.ssl.fastly.net, 4 ba, 0 +ba.gov.br, 0 ba.it, 0 ba.leg.br, 4 babia-gora.pl, 0 @@ -533,6 +548,14 @@ barreau.bj, 0 barrel-of-knowledge.info, 4 barrell-of-knowledge.info, 4 +barsy.bg, 4 +barsy.de, 4 +barsy.eu, 4 +barsy.in, 4 +barsy.net, 4 +barsy.online, 4 +barsy.support, 4 +barsyonline.com, 4 barum.no, 0 bas.it, 0 baseball, 0 @@ -572,6 +595,7 @@ beiarn.no, 0 bel.tr, 0 belau.pw, 0 +belem.br, 0 bellevue.museum, 0 belluno.it, 0 benevento.it, 0 @@ -627,6 +651,7 @@ birdart.museum, 0 birkenes.no, 0 birthplace.museum, 0 +bitballoon.com, 4 biz, 0 biz.at, 4 biz.az, 0 @@ -666,6 +691,7 @@ blogdns.net, 4 blogdns.org, 4 blogsite.org, 4 +blogsite.xyz, 4 blogspot.ae, 4 blogspot.al, 4 blogspot.am, 4 @@ -775,6 +801,7 @@ boo, 0 book, 0 booking, 0 +boomla.net, 4 boots, 0 bosch, 0 bostik, 0 @@ -791,6 +818,9 @@ box, 0 boxfuse.io, 4 bozen.it, 0 +bplaced.com, 4 +bplaced.de, 4 +bplaced.net, 4 br, 0 br.com, 4 br.it, 0 @@ -885,6 +915,7 @@ cam, 0 cam.it, 0 cambridge.museum, 0 +camdvr.org, 4 camera, 0 camp, 0 campania.it, 0 @@ -915,6 +946,7 @@ cartier, 0 cartoonart.museum, 0 casa, 0 +casacam.net, 4 casadelamoneda.museum, 0 case, 0 caseih, 0 @@ -998,6 +1030,7 @@ cd, 0 cd.eu.org, 4 cdn77-ssl.net, 4 +ce.gov.br, 0 ce.it, 0 ce.leg.br, 4 ceb, 0 @@ -1097,6 +1130,7 @@ circus.museum, 0 cisco, 0 ciscofreak.com, 4 +cistron.nl, 4 citadel, 0 citi, 0 citic, 0 @@ -1119,6 +1153,7 @@ cl, 0 cl.it, 0 claims, 0 +clan.rip, 4 cleaning, 0 click, 0 clinic, 0 @@ -1128,6 +1163,10 @@ clothing, 0 cloud, 0 cloud.fedoraproject.org, 4 +cloud.goog, 4 +cloud.metacentrum.cz, 4 +cloudaccess.host, 4 +cloudaccess.net, 4 cloudapp.net, 4 cloudcontrolapp.com, 4 cloudcontrolled.com, 4 @@ -1441,6 +1480,7 @@ creditunion, 0 cremona.it, 0 crew.aero, 0 +cri.br, 0 cri.nz, 0 cricket, 0 crimea.ua, 0 @@ -1461,6 +1501,11 @@ culture.museum, 0 cuneo.it, 0 cupcake.is, 4 +cust.dev.thingdust.io, 4 +cust.disrec.thingdust.io, 4 +cust.prod.thingdust.io, 4 +cust.testing.thingdust.io, 4 +custom.metacentrum.cz, 4 customer.enonic.io, 4 cv, 0 cv.ua, 0 @@ -1513,6 +1558,8 @@ dd-dns.de, 4 ddns.me, 4 ddns.net, 4 +ddnsfree.com, 4 +ddnsgeek.com, 4 ddnsking.com, 4 ddnss.de, 4 ddnss.org, 4 @@ -1520,6 +1567,7 @@ dds, 0 de, 0 de.com, 4 +de.cool, 4 de.eu.org, 4 de.us, 0 deal, 0 @@ -1528,7 +1576,10 @@ deatnu.no, 0 decorativearts.museum, 0 dedyn.io, 4 +def.br, 0 defense.tn, 0 +definima.io, 4 +definima.net, 4 degree, 0 delaware.museum, 0 delivery, 0 @@ -1539,6 +1590,7 @@ deloitte, 0 delta, 0 democrat, 0 +demon.nl, 4 denmark.museum, 0 dental, 0 dentist, 0 @@ -1553,6 +1605,7 @@ dev, 0 dev-myqnapcloud.com, 4 dev.static.land, 4 +df.gov.br, 0 df.leg.br, 4 dgca.aero, 0 dhl, 0 @@ -1624,6 +1677,7 @@ drammen.no, 0 drangedal.no, 0 dray-dns.de, 4 +drayddns.com, 4 draydns.de, 4 dreamhosters.com, 4 drive, 0 @@ -1684,6 +1738,7 @@ dyndns.ws, 4 dyndns1.de, 4 dynns.com, 4 +dynu.net, 4 dynv6.net, 4 dynvpn.de, 4 dyroy.no, 0 @@ -1912,6 +1967,7 @@ erotika.hu, 0 es, 0 es.eu.org, 4 +es.gov.br, 0 es.kr, 0 es.leg.br, 4 esan.hokkaido.jp, 0 @@ -1939,6 +1995,7 @@ eu-1.evennode.com, 4 eu-2.evennode.com, 4 eu-3.evennode.com, 4 +eu-4.evennode.com, 4 eu.com, 4 eu.int, 0 eu.meteorapp.com, 4 @@ -1962,7 +2019,6 @@ exposed, 0 express, 0 express.aero, 0 -ext.githubcloud.com, 6 extraspace, 0 f.bg, 0 f.se, 0 @@ -2026,6 +2082,7 @@ field.museum, 0 figueres.museum, 0 filatelia.museum, 0 +filegear.me, 4 film, 0 film.hu, 0 film.museum, 0 @@ -2078,10 +2135,12 @@ flora.no, 0 florence.it, 0 florida.museum, 0 +floripa.br, 0 florist, 0 floro.no, 0 flowers, 0 fly, 0 +flynnhosting.net, 4 flynnhub.com, 4 fm, 0 fm.br, 0 @@ -2133,7 +2192,9 @@ freebox-os.fr, 4 freeboxos.com, 4 freeboxos.fr, 4 +freeddns.org, 4 freemasonry.museum, 0 +freesite.host, 4 freetls.fastly.net, 4 frei.no, 0 freiburg.museum, 0 @@ -2360,15 +2421,14 @@ gifts, 0 gifu.gifu.jp, 0 gifu.jp, 0 +giize.com, 4 gildeskal.no, 0 ginan.gifu.jp, 0 ginowan.okinawa.jp, 0 ginoza.okinawa.jp, 0 giske.no, 0 -gist.githubcloud.com, 4 +git-repos.de, 4 github.io, 4 -githubcloud.com, 4 -githubcloudusercontent.com, 6 githubusercontent.com, 4 gitlab.io, 4 gives, 0 @@ -2384,6 +2444,7 @@ glass, 0 glass.museum, 0 gle, 0 +gleeze.com, 4 gliding.aero, 0 gliwice.pl, 4 global, 0 @@ -2403,6 +2464,7 @@ go.ci, 0 go.cr, 0 go.dyndns.org, 4 +go.gov.br, 0 go.id, 0 go.it, 0 go.jp, 0 @@ -2761,6 +2823,7 @@ hayakawa.yamanashi.jp, 0 hayashima.okayama.jp, 0 hazu.aichi.jp, 0 +hb.cldmail.ru, 4 hb.cn, 0 hbo, 0 hdfc, 0 @@ -3115,6 +3178,7 @@ info.az, 0 info.bb, 0 info.co, 0 +info.cx, 4 info.ec, 0 info.et, 0 info.ht, 0 @@ -3348,11 +3412,13 @@ jaguar, 0 jambyl.su, 4 jamison.museum, 0 +jampa.br, 0 jan-mayen.no, 0 java, 0 jaworzno.pl, 0 jcb, 0 jcp, 0 +jdevcloud.com, 4 je, 0 jeep, 0 jefferson.museum, 0 @@ -3784,6 +3850,7 @@ koza.wakayama.jp, 0 kozagawa.wakayama.jp, 0 kozaki.chiba.jp, 0 +kozow.com, 4 kp, 0 kpmg, 0 kpn, 0 @@ -3935,6 +4002,7 @@ lb, 0 lc, 0 lc.it, 0 +lcube-server.de, 4 lds, 0 le.it, 0 leangaviika.no, 0 @@ -4042,6 +4110,11 @@ lillehammer.no, 0 lillesand.no, 0 lilly, 0 +lima-city.at, 4 +lima-city.ch, 4 +lima-city.de, 4 +lima-city.rocks, 4 +lima.zone, 4 limanowa.pl, 0 limited, 0 limo, 0 @@ -4087,6 +4160,7 @@ loppa.no, 0 lorenskog.no, 0 losangeles.museum, 0 +loseyourip.com, 4 loten.no, 0 lotte, 0 lotto, 0 @@ -4141,6 +4215,7 @@ m.bg, 0 m.se, 0 ma, 0 +ma.gov.br, 0 ma.leg.br, 4 ma.us, 0 macerata.it, 0 @@ -4300,6 +4375,7 @@ metlife, 0 mex.com, 4 mg, 0 +mg.gov.br, 0 mg.leg.br, 4 mh, 0 mi.it, 0 @@ -4581,6 +4657,7 @@ mr.no, 0 mragowo.pl, 0 ms, 0 +ms.gov.br, 0 ms.it, 0 ms.kr, 0 ms.leg.br, 4 @@ -4590,6 +4667,7 @@ msk.su, 4 mt, 0 mt.eu.org, 4 +mt.gov.br, 0 mt.it, 0 mt.leg.br, 4 mt.us, 0 @@ -4628,6 +4706,7 @@ museumcenter.museum, 0 museumvereniging.museum, 0 music.museum, 0 +musica.ar, 0 mutsu.aomori.jp, 0 mutsuzawa.chiba.jp, 0 mutual, 0 @@ -4647,6 +4726,7 @@ myactivedirectory.com, 4 myasustor.com, 4 mycd.eu, 4 +myddns.rocks, 4 mydissent.net, 4 mydrobo.com, 4 myds.me, 4 @@ -4658,6 +4738,7 @@ myfusion.cloud, 4 myhome-server.de, 4 mykolaiv.ua, 0 +mymailer.com.tw, 4 mymediapc.net, 4 myoko.niigata.jp, 0 mypep.link, 4 @@ -4670,7 +4751,9 @@ mysecuritycamera.org, 4 myshopblocks.com, 4 mytis.ru, 4 +mytuleap.com, 4 myvnc.com, 4 +mywire.org, 4 mz, 0 n.bg, 0 n.se, 0 @@ -4963,6 +5046,7 @@ net.zm, 0 netbank, 0 netflix, 0 +netlify.com, 4 network, 0 neues.museum, 0 neustar, 0 @@ -5070,6 +5154,8 @@ noboribetsu.hokkaido.jp, 0 noda.chiba.jp, 0 noda.iwate.jp, 0 +nodum.co, 4 +nodum.io, 4 nogata.fukuoka.jp, 0 nogi.tochigi.jp, 0 noheji.aomori.jp, 0 @@ -5077,20 +5163,41 @@ noip.us, 4 nokia, 0 nom.ad, 0 +nom.ae, 4 nom.ag, 0 +nom.ai, 4 +nom.al, 4 nom.br, 2 +nom.cl, 4 nom.co, 0 nom.es, 0 nom.fr, 0 +nom.gd, 4 +nom.gl, 4 +nom.gt, 4 +nom.hn, 4 +nom.im, 4 nom.km, 0 +nom.li, 4 nom.mg, 0 +nom.mk, 4 +nom.nc, 0 nom.ni, 0 +nom.nu, 4 nom.pa, 0 nom.pe, 0 nom.pl, 0 +nom.pw, 4 +nom.qa, 4 nom.re, 0 nom.ro, 0 +nom.rs, 4 +nom.si, 4 nom.tm, 0 +nom.ug, 4 +nom.uy, 4 +nom.vc, 4 +nom.vg, 4 nom.za, 0 nome.pt, 0 nomi.ishikawa.jp, 0 @@ -5159,6 +5266,23 @@ nyc, 0 nyc.mn, 4 nyc.museum, 0 +nym.by, 4 +nym.bz, 4 +nym.gr, 4 +nym.kz, 4 +nym.la, 4 +nym.li, 4 +nym.lt, 4 +nym.lu, 4 +nym.me, 4 +nym.mx, 4 +nym.nz, 4 +nym.pe, 4 +nym.pt, 4 +nym.sk, 4 +nym.su, 4 +nym.sx, 4 +nym.tw, 4 nyny.museum, 0 nysa.pl, 0 nyuzen.toyama.jp, 0 @@ -5303,6 +5427,7 @@ ontario.museum, 0 onthewifi.com, 4 onyourside, 0 +ooguy.com, 4 ookuwa.nagano.jp, 0 ooo, 0 ooshika.nagano.jp, 0 @@ -5477,7 +5602,6 @@ org.zm, 0 org.zw, 0 organic, 0 -orientexpress, 0 origins, 0 oristano.it, 0 orkanger.no, 0 @@ -5556,6 +5680,7 @@ p.bg, 0 p.se, 0 pa, 0 +pa.gov.br, 0 pa.gov.pl, 0 pa.it, 0 pa.leg.br, 4 @@ -5596,6 +5721,7 @@ pavia.it, 0 pay, 0 pb.ao, 0 +pb.gov.br, 0 pb.leg.br, 4 pc.it, 0 pc.pl, 0 @@ -5603,6 +5729,7 @@ pd.it, 0 pe, 0 pe.ca, 0 +pe.gov.br, 0 pe.it, 0 pe.kr, 0 pe.leg.br, 4 @@ -5641,6 +5768,7 @@ photography.museum, 0 photos, 0 physio, 0 +pi.gov.br, 0 pi.it, 0 pi.leg.br, 4 piacenza.it, 0 @@ -5675,6 +5803,7 @@ planetarium.museum, 0 plantation.museum, 0 plants.museum, 0 +platformsh.site, 6 play, 0 playstation, 0 plaza.museum, 0 @@ -5691,6 +5820,7 @@ pnc, 0 po.gov.pl, 0 po.it, 0 +poa.br, 0 podhale.pl, 0 podlasie.pl, 0 podzone.net, 4 @@ -5730,6 +5860,7 @@ pp.ua, 4 ppg.br, 0 pr, 0 +pr.gov.br, 0 pr.it, 0 pr.leg.br, 4 pr.us, 0 @@ -5833,6 +5964,7 @@ quebec.museum, 0 quest, 0 quicksytes.com, 4 +quipelements.com, 6 qvc, 0 r.bg, 0 r.cdn77.net, 4 @@ -5881,6 +6013,7 @@ rec.ro, 0 rec.ve, 0 recht.pro, 0 +recife.br, 0 recipes, 0 recreation.aero, 0 red, 0 @@ -5951,10 +6084,12 @@ rissa.no, 0 ritto.shiga.jp, 0 rivne.ua, 0 +rj.gov.br, 0 rj.leg.br, 4 rl.no, 0 rm.it, 0 rmit, 0 +rn.gov.br, 0 rn.it, 0 rn.leg.br, 4 rnrt.tn, 0 @@ -5962,6 +6097,7 @@ rnu.tn, 0 ro, 0 ro.eu.org, 4 +ro.gov.br, 0 ro.im, 4 ro.it, 0 ro.leg.br, 4 @@ -5989,8 +6125,10 @@ rovno.ua, 0 royken.no, 0 royrvik.no, 0 +rr.gov.br, 0 rr.leg.br, 4 rs, 0 +rs.gov.br, 0 rs.leg.br, 4 rsc.cdn77.org, 4 rsvp, 0 @@ -6189,6 +6327,7 @@ sbs, 0 sc, 0 sc.cn, 0 +sc.gov.br, 0 sc.kr, 0 sc.leg.br, 4 sc.tz, 0 @@ -6246,6 +6385,7 @@ se, 0 se.com, 4 se.eu.org, 4 +se.gov.br, 0 se.leg.br, 4 se.net, 4 seaport.museum, 0 @@ -6285,6 +6425,7 @@ sendai.jp, 2 sener, 0 sennan.osaka.jp, 0 +sensiosite.cloud, 6 seoul.kr, 0 sera.hiroshima.jp, 0 seranishi.hiroshima.jp, 0 @@ -6565,6 +6706,7 @@ southwest.museum, 0 sowa.ibaraki.jp, 0 soy, 0 +sp.gov.br, 0 sp.it, 0 sp.leg.br, 4 space, 0 @@ -6584,6 +6726,9 @@ spy.museum, 0 spydeberg.no, 0 square.museum, 0 +square7.ch, 4 +square7.de, 4 +square7.net, 4 sr, 0 sr.gov.pl, 0 sr.it, 0 @@ -6597,6 +6742,7 @@ stackspace.space, 4 stada, 0 stadt.museum, 0 +stage.nodeart.io, 4 stalbans.museum, 0 stalowa-wola.pl, 0 stange.no, 0 @@ -6703,6 +6849,7 @@ sveio.no, 0 svelvik.no, 0 svizzera.museum, 0 +svn-repos.de, 4 swatch, 0 sweden.museum, 0 sweetpepper.org, 4 @@ -6861,6 +7008,7 @@ telekommunikation.museum, 0 television.museum, 0 temasek, 0 +temp-dns.com, 4 tempio-olbia.it, 0 tempioolbia.it, 0 tendo.yamagata.jp, 0 @@ -6887,6 +7035,7 @@ theater, 0 theater.museum, 0 theatre, 0 +theworkpc.com, 4 thruhere.net, 4 tiaa, 0 tickets, 0 @@ -6927,6 +7076,7 @@ tn.it, 0 tn.us, 0 to, 0 +to.gov.br, 0 to.it, 0 to.leg.br, 4 toba.mie.jp, 0 @@ -7042,6 +7192,7 @@ trading, 0 trading.aero, 0 traeumtgerade.de, 4 +trafficplex.cloud, 4 trainer.aero, 0 training, 0 trana.no, 0 @@ -7161,6 +7312,9 @@ tvs, 0 tw, 0 tw.cn, 0 +twmail.cc, 4 +twmail.net, 4 +twmail.org, 4 tx.us, 0 tychy.pl, 0 tydal.no, 0 @@ -7240,6 +7394,7 @@ urbinopesaro.it, 0 ureshino.mie.jp, 0 uri.arpa, 0 +url.tw, 4 urn.arpa, 0 uruma.okinawa.jp, 0 uryu.hokkaido.jp, 0 @@ -7247,6 +7402,7 @@ us-1.evennode.com, 4 us-2.evennode.com, 4 us-3.evennode.com, 4 +us-4.evennode.com, 4 us-east-1.amazonaws.com, 4 us.com, 4 us.eu.org, 4 @@ -7320,6 +7476,8 @@ vantaa.museum, 0 vanylven.no, 0 vao.it, 0 +vapor.cloud, 4 +vaporcloud.io, 4 vardo.no, 0 varese.it, 0 varggat.no, 0 @@ -7398,6 +7556,7 @@ viterbo.it, 0 viva, 0 vivo, 0 +vix.br, 0 vlaanderen, 0 vlaanderen.museum, 0 vladikavkaz.ru, 4 @@ -7469,6 +7628,7 @@ watches, 0 waw.pl, 0 wazuka.kyoto.jp, 0 +we.bs, 4 weather, 0 weatherchannel, 0 web.co, 0 @@ -7489,9 +7649,13 @@ webhop.me, 4 webhop.net, 4 webhop.org, 4 +webredirect.org, 4 website, 0 +webspace.rocks, 4 wed, 0 wedding, 0 +wedeploy.io, 4 +wedeploy.me, 4 wegrow.pl, 0 weibo, 0 weir, 0 @@ -7540,6 +7704,7 @@ world, 0 worse-than.tv, 4 wow, 0 +wpdevcloud.com, 4 writesthisblog.com, 4 wroc.pl, 4 wroclaw.pl, 0 @@ -7567,20 +7732,26 @@ xj.cn, 0 xn--0trq7p7nn.jp, 0 xn--11b4c3d, 0 +xn--12c1fe0br.xn--o3cw4h, 0 +xn--12cfi8ixb8l.xn--o3cw4h, 0 +xn--12co0c3b4eva.xn--o3cw4h, 0 xn--1ck2e1b, 0 xn--1ctwo.jp, 0 xn--1lqs03n.jp, 0 xn--1lqs71d.jp, 0 xn--1qqw23a, 0 xn--2m4a15e.jp, 0 +xn--2scrj9c, 0 xn--30rr7y, 0 xn--32vp30h.jp, 0 xn--3bst00m, 0 xn--3ds443g, 0 xn--3e0b707e, 0 +xn--3hcrj9c, 0 xn--3oq18vl8pn36a, 0 xn--3pxu8k, 0 xn--42c2d9a, 0 +xn--45br5cyl, 0 xn--45brj9c, 0 xn--45q11c, 0 xn--4gbrim, 0 @@ -7612,6 +7783,7 @@ xn--8pvr4u.jp, 0 xn--8y0a063a, 0 xn--90a3ac, 0 +xn--90ae, 0 xn--90ais, 0 xn--90azh.xn--90a3ac, 0 xn--9dbhblg6di.museum, 0 @@ -7707,7 +7879,10 @@ xn--gmqw5a.hk, 0 xn--h-2fa.no, 0 xn--h1aegh.museum, 0 +xn--h2breg3eve, 0 xn--h2brj9c, 0 +xn--h2brj9c8c, 0 +xn--h3cuzk1di.xn--o3cw4h, 0 xn--hbmer-xqa.no, 0 xn--hcesuolo-7ya35b.no, 0 xn--hery-ira.nordland.no, 0 @@ -7777,6 +7952,7 @@ xn--lt-liac.no, 0 xn--lten-gra.no, 0 xn--lury-ira.no, 0 +xn--m3ch0j3a.xn--o3cw4h, 0 xn--mely-ira.no, 0 xn--merker-kua.no, 0 xn--mgb2ddes, 0 @@ -7799,6 +7975,7 @@ xn--mgbca7dzdo, 0 xn--mgberp4a5d4a87g, 0 xn--mgberp4a5d4ar, 0 +xn--mgbgu82a, 0 xn--mgbi4ecexp, 0 xn--mgbpl2fh, 0 xn--mgbqly7c0a67fbc, 0 @@ -7843,6 +8020,7 @@ xn--o1ac.xn--90a3ac, 0 xn--o1ach.xn--90a3ac, 0 xn--o3cw4h, 0 +xn--o3cyx2a.xn--o3cw4h, 0 xn--od0alg.cn, 0 xn--od0alg.hk, 0 xn--od0aq3b.hk, 0 @@ -7883,6 +8061,7 @@ xn--rskog-uua.no, 0 xn--rst-0na.no, 0 xn--rsta-fra.no, 0 +xn--rvc1e0am3e, 0 xn--ryken-vua.no, 0 xn--ryrvik-bya.no, 0 xn--s-1fa.no, 0
diff --git a/src/url/gurl_unittest.cc b/src/url/gurl_unittest.cc index a3b43d6..bf5a004 100644 --- a/src/url/gurl_unittest.cc +++ b/src/url/gurl_unittest.cc
@@ -645,12 +645,26 @@ // Constructor. GURL url_1(" \t ht\ntp://\twww.goo\rgle.com/as\ndf \n "); EXPECT_EQ("http://www.google.com/asdf", url_1.spec()); - EXPECT_TRUE(url_1.parsed_for_possibly_invalid_spec().whitespace_removed); + EXPECT_FALSE( + url_1.parsed_for_possibly_invalid_spec().potentially_dangling_markup); // Relative path resolver. GURL url_2 = url_1.Resolve(" \n /fo\to\r "); EXPECT_EQ("http://www.google.com/foo", url_2.spec()); - EXPECT_TRUE(url_2.parsed_for_possibly_invalid_spec().whitespace_removed); + EXPECT_FALSE( + url_2.parsed_for_possibly_invalid_spec().potentially_dangling_markup); + + // Constructor. + GURL url_3(" \t ht\ntp://\twww.goo\rgle.com/as\ndf< \n "); + EXPECT_EQ("http://www.google.com/asdf%3C", url_3.spec()); + EXPECT_TRUE( + url_3.parsed_for_possibly_invalid_spec().potentially_dangling_markup); + + // Relative path resolver. + GURL url_4 = url_1.Resolve(" \n /fo\to<\r "); + EXPECT_EQ("http://www.google.com/foo%3C", url_4.spec()); + EXPECT_TRUE( + url_4.parsed_for_possibly_invalid_spec().potentially_dangling_markup); // Note that newlines are NOT stripped from ReplaceComponents. }
diff --git a/src/url/origin.cc b/src/url/origin.cc index 1b0a9a6..2bf959c 100644 --- a/src/url/origin.cc +++ b/src/url/origin.cc
@@ -106,8 +106,10 @@ Origin Origin::UnsafelyCreateOriginWithoutNormalization( base::StringPiece scheme, base::StringPiece host, - uint16_t port) { - return Origin(scheme, host, port, "", SchemeHostPort::CHECK_CANONICALIZATION); + uint16_t port, + base::StringPiece suborigin) { + return Origin(scheme, host, port, suborigin, + SchemeHostPort::CHECK_CANONICALIZATION); } Origin Origin::CreateFromNormalizedTupleWithSuborigin( @@ -172,7 +174,8 @@ } bool Origin::operator<(const Origin& other) const { - return tuple_ < other.tuple_; + return tuple_ < other.tuple_ || + (tuple_.Equals(other.tuple_) && suborigin_ < other.suborigin_); } std::ostream& operator<<(std::ostream& out, const url::Origin& origin) {
diff --git a/src/url/origin.h b/src/url/origin.h index 4b838e4..9e6b492 100644 --- a/src/url/origin.h +++ b/src/url/origin.h
@@ -89,9 +89,9 @@ // 3. 'file' URLs all parse as ("file", "", 0). explicit Origin(const GURL& url); - // Creates an Origin from a |scheme|, |host|, and |port|. All the parameters - // must be valid and canonicalized. Do not use this method to create unique - // origins. Use Origin() for that. + // Creates an Origin from a |scheme|, |host|, |port| and |suborigin|. All the + // parameters must be valid and canonicalized. Do not use this method to + // create unique origins. Use Origin() for that. // // This constructor should be used in order to pass 'Origin' objects back and // forth over IPC (as transitioning through GURL would risk potentially @@ -100,7 +100,8 @@ static Origin UnsafelyCreateOriginWithoutNormalization( base::StringPiece scheme, base::StringPiece host, - uint16_t port); + uint16_t port, + base::StringPiece suborigin); // Creates an origin without sanity checking that the host is canonicalized. // This should only be used when converting between already normalized types,
diff --git a/src/url/origin_unittest.cc b/src/url/origin_unittest.cc index d09030a..502ef98 100644 --- a/src/url/origin_unittest.cc +++ b/src/url/origin_unittest.cc
@@ -363,7 +363,7 @@ SCOPED_TRACE(testing::Message() << test.scheme << "://" << test.host << ":" << test.port); url::Origin origin = url::Origin::UnsafelyCreateOriginWithoutNormalization( - test.scheme, test.host, test.port); + test.scheme, test.host, test.port, ""); EXPECT_EQ(test.scheme, origin.scheme()); EXPECT_EQ(test.host, origin.host()); EXPECT_EQ(test.port, origin.port()); @@ -400,7 +400,7 @@ SCOPED_TRACE(testing::Message() << test.scheme << "://" << test.host << ":" << test.port); url::Origin origin = url::Origin::UnsafelyCreateOriginWithoutNormalization( - test.scheme, test.host, test.port); + test.scheme, test.host, test.port, ""); EXPECT_EQ("", origin.scheme()); EXPECT_EQ("", origin.host()); EXPECT_EQ(0, origin.port()); @@ -430,7 +430,7 @@ << test.port); url::Origin origin = url::Origin::UnsafelyCreateOriginWithoutNormalization( std::string(test.scheme, test.scheme_length), - std::string(test.host, test.host_length), test.port); + std::string(test.host, test.host_length), test.port, ""); EXPECT_EQ("", origin.scheme()); EXPECT_EQ("", origin.host()); EXPECT_EQ(0, origin.port());
diff --git a/src/url/third_party/mozilla/url_parse.cc b/src/url/third_party/mozilla/url_parse.cc index 4cba88c..d77fb5f 100644 --- a/src/url/third_party/mozilla/url_parse.cc +++ b/src/url/third_party/mozilla/url_parse.cc
@@ -692,7 +692,7 @@ } // namespace -Parsed::Parsed() : whitespace_removed(false), inner_parsed_(NULL) {} +Parsed::Parsed() : potentially_dangling_markup(false), inner_parsed_(NULL) {} Parsed::Parsed(const Parsed& other) : scheme(other.scheme), @@ -703,7 +703,7 @@ path(other.path), query(other.query), ref(other.ref), - whitespace_removed(other.whitespace_removed), + potentially_dangling_markup(other.potentially_dangling_markup), inner_parsed_(NULL) { if (other.inner_parsed_) set_inner_parsed(*other.inner_parsed_); @@ -719,7 +719,7 @@ path = other.path; query = other.query; ref = other.ref; - whitespace_removed = other.whitespace_removed; + potentially_dangling_markup = other.potentially_dangling_markup; if (other.inner_parsed_) set_inner_parsed(*other.inner_parsed_); else
diff --git a/src/url/third_party/mozilla/url_parse.h b/src/url/third_party/mozilla/url_parse.h index 968578b..6d40d3f 100644 --- a/src/url/third_party/mozilla/url_parse.h +++ b/src/url/third_party/mozilla/url_parse.h
@@ -177,8 +177,12 @@ // the string with the scheme stripped off. Component GetContent() const; - // True if whitespace was removed from the URL during parsing. - bool whitespace_removed; + // True if the URL's source contained a raw `<` character, and whitespace was + // removed from the URL during parsing + // + // TODO(mkwst): Link this to something in a spec if + // https://github.com/whatwg/url/pull/284 lands. + bool potentially_dangling_markup; // This is used for nested URL types, currently only filesystem. If you // parse a filesystem URL, the resulting Parsed will have a nested
diff --git a/src/url/url_canon.h b/src/url/url_canon.h index d093f35..887150b 100644 --- a/src/url/url_canon.h +++ b/src/url/url_canon.h
@@ -231,14 +231,21 @@ // // Therefore, callers should not use the buffer, since it may actually be empty, // use the computed pointer and |*output_len| instead. -URL_EXPORT const char* RemoveURLWhitespace(const char* input, int input_len, +// +// If |input| contained both removable whitespace and a raw `<` character, +// |potentially_dangling_markup| will be set to `true`. Otherwise, it will be +// left untouched. +URL_EXPORT const char* RemoveURLWhitespace(const char* input, + int input_len, CanonOutputT<char>* buffer, - int* output_len); + int* output_len, + bool* potentially_dangling_markup); URL_EXPORT const base::char16* RemoveURLWhitespace( const base::char16* input, int input_len, CanonOutputT<base::char16>* buffer, - int* output_len); + int* output_len, + bool* potentially_dangling_markup); // IDN ------------------------------------------------------------------------
diff --git a/src/url/url_canon_etc.cc b/src/url/url_canon_etc.cc index 9dd40da..31e9fb5 100644 --- a/src/url/url_canon_etc.cc +++ b/src/url/url_canon_etc.cc
@@ -22,10 +22,12 @@ // Backend for RemoveURLWhitespace (see declaration in url_canon.h). // It sucks that we have to do this, since this takes about 13% of the total URL // canonicalization time. -template<typename CHAR> -const CHAR* DoRemoveURLWhitespace(const CHAR* input, int input_len, +template <typename CHAR> +const CHAR* DoRemoveURLWhitespace(const CHAR* input, + int input_len, CanonOutputT<CHAR>* buffer, - int* output_len) { + int* output_len, + bool* potentially_dangling_markup) { // Fast verification that there's nothing that needs removal. This is the 99% // case, so we want it to be fast and don't care about impacting the speed // when we do find whitespace. @@ -46,8 +48,11 @@ // Remove the whitespace into the new buffer and return it. for (int i = 0; i < input_len; i++) { - if (!IsRemovableURLWhitespace(input[i])) + if (!IsRemovableURLWhitespace(input[i])) { + if (potentially_dangling_markup && input[i] == 0x3C) + *potentially_dangling_markup = true; buffer->push_back(input[i]); + } } *output_len = buffer->length(); return buffer->data(); @@ -274,17 +279,22 @@ } // namespace -const char* RemoveURLWhitespace(const char* input, int input_len, +const char* RemoveURLWhitespace(const char* input, + int input_len, CanonOutputT<char>* buffer, - int* output_len) { - return DoRemoveURLWhitespace(input, input_len, buffer, output_len); + int* output_len, + bool* potentially_dangling_markup) { + return DoRemoveURLWhitespace(input, input_len, buffer, output_len, + potentially_dangling_markup); } const base::char16* RemoveURLWhitespace(const base::char16* input, int input_len, CanonOutputT<base::char16>* buffer, - int* output_len) { - return DoRemoveURLWhitespace(input, input_len, buffer, output_len); + int* output_len, + bool* potentially_dangling_markup) { + return DoRemoveURLWhitespace(input, input_len, buffer, output_len, + potentially_dangling_markup); } char CanonicalSchemeChar(base::char16 ch) {
diff --git a/src/url/url_canon_relative.cc b/src/url/url_canon_relative.cc index 851368d..659aca7 100644 --- a/src/url/url_canon_relative.cc +++ b/src/url/url_canon_relative.cc
@@ -441,8 +441,13 @@ CharsetConverter* query_converter, CanonOutput* output, Parsed* out_parsed) { - // Starting point for our output parsed. We'll fix what we change. + // |base_parsed| is the starting point for our output. Since we may have + // removed whitespace from |relative_url| before entering this method, we'll + // carry over the |potentially_dangling_markup| flag. + bool potentially_dangling_markup = out_parsed->potentially_dangling_markup; *out_parsed = base_parsed; + if (potentially_dangling_markup) + out_parsed->potentially_dangling_markup = true; // Sanity check: the input should have a host or we'll break badly below. // We can only resolve relative URLs with base URLs that have hosts and
diff --git a/src/url/url_util.cc b/src/url/url_util.cc index 0fe9983..a390a9d 100644 --- a/src/url/url_util.cc +++ b/src/url/url_util.cc
@@ -187,8 +187,8 @@ // This matches the canonicalization done in DoCanonicalize function. RawCanonOutputT<CHAR> whitespace_buffer; int spec_len; - const CHAR* spec = RemoveURLWhitespace(str, str_len, - &whitespace_buffer, &spec_len); + const CHAR* spec = + RemoveURLWhitespace(str, str_len, &whitespace_buffer, &spec_len, nullptr); Component our_scheme; if (!ExtractScheme(spec, spec_len, &our_scheme)) { @@ -216,11 +216,8 @@ // Possibly this will result in copying to the new buffer. RawCanonOutputT<CHAR> whitespace_buffer; if (whitespace_policy == REMOVE_WHITESPACE) { - int original_len = spec_len; - spec = - RemoveURLWhitespace(spec, original_len, &whitespace_buffer, &spec_len); - if (spec_len != original_len) - output_parsed->whitespace_removed = true; + spec = RemoveURLWhitespace(spec, spec_len, &whitespace_buffer, &spec_len, + &output_parsed->potentially_dangling_markup); } Parsed parsed_input; @@ -298,11 +295,9 @@ // copying to the new buffer. RawCanonOutputT<CHAR> whitespace_buffer; int relative_length; - const CHAR* relative = RemoveURLWhitespace(in_relative, in_relative_length, - &whitespace_buffer, - &relative_length); - if (in_relative_length != relative_length) - output_parsed->whitespace_removed = true; + const CHAR* relative = RemoveURLWhitespace( + in_relative, in_relative_length, &whitespace_buffer, &relative_length, + &output_parsed->potentially_dangling_markup); bool base_is_authority_based = false; bool base_is_hierarchical = false;
diff --git a/src/url/url_util_unittest.cc b/src/url/url_util_unittest.cc index 6d7c8f7..40e4c9f 100644 --- a/src/url/url_util_unittest.cc +++ b/src/url/url_util_unittest.cc
@@ -374,6 +374,54 @@ EXPECT_FALSE(resolved_parsed.ref.is_valid()); } +TEST(URLUtilTest, PotentiallyDanglingMarkup) { + struct ResolveRelativeCase { + const char* base; + const char* rel; + bool potentially_dangling_markup; + const char* out; + } cases[] = { + {"https://example.com/", "/path<", false, "https://example.com/path%3C"}, + {"https://example.com/", "\n/path<", true, "https://example.com/path%3C"}, + {"https://example.com/", "\r/path<", true, "https://example.com/path%3C"}, + {"https://example.com/", "\t/path<", true, "https://example.com/path%3C"}, + {"https://example.com/", "/pa\nth<", true, "https://example.com/path%3C"}, + {"https://example.com/", "/pa\rth<", true, "https://example.com/path%3C"}, + {"https://example.com/", "/pa\tth<", true, "https://example.com/path%3C"}, + {"https://example.com/", "/path\n<", true, "https://example.com/path%3C"}, + {"https://example.com/", "/path\r<", true, "https://example.com/path%3C"}, + {"https://example.com/", "/path\r<", true, "https://example.com/path%3C"}, + {"https://example.com/", "\n/<path", true, "https://example.com/%3Cpath"}, + {"https://example.com/", "\r/<path", true, "https://example.com/%3Cpath"}, + {"https://example.com/", "\t/<path", true, "https://example.com/%3Cpath"}, + {"https://example.com/", "/<pa\nth", true, "https://example.com/%3Cpath"}, + {"https://example.com/", "/<pa\rth", true, "https://example.com/%3Cpath"}, + {"https://example.com/", "/<pa\tth", true, "https://example.com/%3Cpath"}, + {"https://example.com/", "/<path\n", true, "https://example.com/%3Cpath"}, + {"https://example.com/", "/<path\r", true, "https://example.com/%3Cpath"}, + {"https://example.com/", "/<path\r", true, "https://example.com/%3Cpath"}, + }; + + for (const auto& test : cases) { + SCOPED_TRACE(::testing::Message() << test.base << ", " << test.rel); + Parsed base_parsed; + ParseStandardURL(test.base, strlen(test.base), &base_parsed); + + std::string resolved; + StdStringCanonOutput output(&resolved); + Parsed resolved_parsed; + bool valid = + ResolveRelative(test.base, strlen(test.base), base_parsed, test.rel, + strlen(test.rel), NULL, &output, &resolved_parsed); + ASSERT_TRUE(valid); + output.Complete(); + + EXPECT_EQ(test.potentially_dangling_markup, + resolved_parsed.potentially_dangling_markup); + EXPECT_EQ(test.out, resolved); + } +} + TEST(URLUtilTest, TestDomainIs) { const struct { const char* canonicalized_host;