Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: url/gurl.h

Issue 185133005: Move referrer stripping into GURL::GetAsReferrer(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch over the Android ContextMenuHelper. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: url/gurl.h
diff --git a/url/gurl.h b/url/gurl.h
index dc88fec25c0d7468e53602fc4ad5e3d2a4b08f2d..28897d16703e514b3166878ef784d16cdfaf43ae 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -195,6 +195,11 @@ class URL_EXPORT GURL {
// will be the empty URL.
GURL GetOrigin() const;
+ // A helper function to return a GURL stripped from the elements that are not
+ // supposed to be sent as HTTP referrer: username, password and ref fragment.
+ // For invalid URLs the original URL will be returned.
+ GURL GetAsReferrer() const;
+
// Returns true if the scheme for the current URL is a known "standard"
// scheme. Standard schemes have an authority and a path section. This
// includes file: and filesystem:, which some callers may want to filter out

Powered by Google App Engine
This is Rietveld 408576698