summaryrefslogtreecommitdiffstats
path: root/url/gurl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move referrer stripping into GURL::GetAsReferrer().ppi@chromium.org2014-03-201-0/+12
| | | | | | | | | | | This patch moves the code that removes username, password and ref parts of the url from http referrers into GURL::GetAsReferrer(). BUG=340295 Review URL: https://codereview.chromium.org/185133005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258392 0039d316-1c4b-4281-b951-d872f2087c98
* Support URL fragment resolution against non-hierarchical schemesjoth@chromium.org2013-11-231-35/+31
| | | | | | | | | | | | | | | | | | | | | | Support URL fragment resolution against non-hierarchical schemes As a result, data: about: etc now have 'query' and 'ref' components parsed; as a result a new GURL::GetContent() convenience is added to retrieve the spec with the scheme stripped off. A complication in supporting this is that we now need to allow whitespace to trailing whitespace to be preserved when transferring url_parse::Parsed structs between KURL and GURL. Without this, the URL prior to the #fragment can change (i.e. whitespace stripped) when following an anchor link which breaks the page (causes reload from source). See http://crbug.com/291747 for more details on this. R=brettw@chromium.org TBR=cbentzel@chromium.org BUG=291747 Review URL: https://codereview.chromium.org/23835019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236917 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some debugging checks that expect HTTP protocol schemes to alsoricea@chromium.org2013-11-221-0/+4
| | | | | | | | | | | | | | accept WebSocket protocol schemes. No functional change to release builds. Debug builds will stop crashing when the new WebSocket implementation is used. BUG= TEST=net_unittests Review URL: https://codereview.chromium.org/68213017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236713 0039d316-1c4b-4281-b951-d872f2087c98
* Use copy-swap idiom for GURL::operator=cjhopman@chromium.org2013-10-241-12/+2
| | | | | | | | | | | | | All the work to correctly handle ownership and internal state of GURL is already done by the copy-constructor, destructor, and GURL::Swap. Repeating that work for GURL::operator= is just another place where we might get it wrong. BUG=309975 Review URL: https://codereview.chromium.org/30693010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230829 0039d316-1c4b-4281-b951-d872f2087c98
* Preparing to support fragment resolution against non-hierarchical schemeskristianm@chromium.org2013-10-241-0/+4
| | | | | | | | | | | | | Adds a new GURL::GetContent() to retrieve the text after scheme: specifically intended for use in non-hierarchical schemes (data: etc). Doing the first part of https://codereview.chromium.org/23835019/ in a preparation CL. BUG=291747 Review URL: https://codereview.chromium.org/23549039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230781 0039d316-1c4b-4281-b951-d872f2087c98
* Make GURL use scoped_ptr for inner_url_akalin@chromium.org2013-10-221-29/+29
| | | | | | | | | BUG=309975 R=brettw@chromium.org, darin@chromium.org Review URL: https://codereview.chromium.org/34843004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230211 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug in GURL with self-assignment and non-NULL inner_url_akalin@chromium.org2013-10-221-0/+3
| | | | | | | | | BUG=309975 R=darin@chromium.org Review URL: https://codereview.chromium.org/32583006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230079 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce GURL::SchemeIsHttpFamily(), which returns true for http and https.cdn@chromium.org2013-08-221-0/+4
| | | | | | | | | | BUG=274679 TEST=N/A TBR=cbentzel, jamesr, simonjam, tzik, stevet, mpcomplete Review URL: https://chromiumcodereview.appspot.com/23064011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218893 0039d316-1c4b-4281-b951-d872f2087c98
* Allow efficient WebURL -> GURL conversionsabarth@chromium.org2013-07-261-2/+15
| | | | | | | | | | | | | | | | | This CL adds a constructor to GURL that takes a std::string instead of a char* and a length. This constructor allows Blink to produce a temporary std::string containing the URL's spec that we can move directly into the GURL, avoiding a copy. Once I update Blink, this constructor will help us avoid spending 5% of our total time rendering http://sina.com.cn on KURL -> GURL conversions. R=brettw BUG=261412 Review URL: https://chromiumcodereview.appspot.com/20127002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213885 0039d316-1c4b-4281-b951-d872f2087c98
* Use base:: on string16 and char16 in net/ and url/avi@chromium.org2013-06-111-4/+4
| | | | | | | | | | BUG=none TEST=no change TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/16413006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205636 0039d316-1c4b-4281-b951-d872f2087c98
* url: Replace Google copyright with the Chromium licence in all files that ↵tfarina@chromium.org2013-04-241-28/+3
| | | | | | | | | | | uses it. BUG=229660 R=brettw@chromium.org Review URL: https://codereview.chromium.org/14222028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195974 0039d316-1c4b-4281-b951-d872f2087c98
* url: Build it as a static library.tfarina@chromium.org2013-04-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | This is temporary just to avoid weird link issues in Windows XP. - Update the gyp file. - Rename the gyp file from googleurl.gyp to url.gyp, so it matches the directory name. - Update the header include paths. - Update the header include guards. - Rename the target name from googleurl to url and googleurl_unittests to url_unittests. - Remove GURL_API (this will be replaced by URL_EXPORT when we componentize it again). - Remove url_common.h (will be replaced by url_export.h when we componentize it again). BUG=229660 TEST=url_unittests R=brettw@chromium.org Review URL: https://codereview.chromium.org/13998025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195005 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 193777 "url: Changes to make it build standalone."jochen@chromium.org2013-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | url/url_canon_stdstring.h:65: error: undefined reference to 'vtable for url_canon::StdStringCanonOutput' > url: Changes to make it build standalone. > > - Update the gyp file. > - Rename the gyp file from googleurl.gyp to url.gyp, so it matches the directory > name. > - Update the header include paths. > - Update the header include guards. > - Rename the target name from googleurl to url and googleurl_unittests to > url_unittests. > - Add missing OVERRIDEs where clang complains. > > BUG=229660 > TEST=url_unittests > R=brettw@chromium.org > > Review URL: https://codereview.chromium.org/14016005 TBR=tfarina@chromium.org Review URL: https://codereview.chromium.org/14264002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194155 0039d316-1c4b-4281-b951-d872f2087c98
* url: Changes to make it build standalone.tfarina@chromium.org2013-04-111-4/+4
| | | | | | | | | | | | | | | | | | | - Update the gyp file. - Rename the gyp file from googleurl.gyp to url.gyp, so it matches the directory name. - Update the header include paths. - Update the header include guards. - Rename the target name from googleurl to url and googleurl_unittests to url_unittests. - Add missing OVERRIDEs where clang complains. BUG=229660 TEST=url_unittests R=brettw@chromium.org Review URL: https://codereview.chromium.org/14016005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193777 0039d316-1c4b-4281-b951-d872f2087c98
* Move googleurl into the Chrome repo.brettw@chromium.org2013-04-101-0/+529
Original location: https://code.google.com/p/google-url/ This includes changes up to r184. These files are unchanged from the Google Code repo and do not yet build. Updating includes, etc. will be done in a separate pass. Review URL: https://codereview.chromium.org/13821004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193439 0039d316-1c4b-4281-b951-d872f2087c98