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

Unified Diff: net/base/net_util.cc

Issue 10578017: Test GURL::spec() usage changes with DEPS rolled to the new version. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 years, 6 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
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc ('k') | net/proxy/proxy_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 126fc327648869bc9059ba31c061ad78ca08633d..7eaf8d865215ee2e25bcef69b10701303a3e358c 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -1694,7 +1694,9 @@ void GetIdentityFromURL(const GURL& url,
}
std::string GetHostOrSpecFromURL(const GURL& url) {
- return url.has_host() ? TrimEndingDot(url.host()) : url.spec();
+ return url.has_host() ?
+ TrimEndingDot(url.host()) :
+ (url.is_valid() ? url.spec() : GURL::EmptyGURL().spec());
}
void AppendFormattedHost(const GURL& url,
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc ('k') | net/proxy/proxy_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698