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

Unified Diff: net/base/url_util.h

Issue 1582083002: net: move GetIdentifyFromURL function into url_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: net/base/url_util.h
diff --git a/net/base/url_util.h b/net/base/url_util.h
index cab75a9d72145f1d46cf3ecb47f56fb45443ab95..239a93cd4d742f0011dba1241064a4803b1bb11b 100644
--- a/net/base/url_util.h
+++ b/net/base/url_util.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/macros.h"
+#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "net/base/net_export.h"
#include "url/third_party/mozilla/url_parse.h"
@@ -82,6 +83,12 @@ NET_EXPORT bool GetValueForKeyInQuery(const GURL& url,
// Returns the hostname by trimming the ending dot, if one exists.
NET_EXPORT std::string TrimEndingDot(const base::StringPiece& host);
+// Extracts the unescaped username/password from |url|, saving the results
+// into |*username| and |*password|.
+NET_EXPORT_PRIVATE void GetIdentityFromURL(const GURL& url,
+ base::string16* username,
+ base::string16* password);
+
} // namespace net
#endif // NET_BASE_URL_UTIL_H_
« net/base/net_util.h ('K') | « net/base/net_util_unittest.cc ('k') | net/base/url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698