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

Unified Diff: net/url_request/url_request.h

Issue 9570005: Added callback to DownloadUrl() so we can find download failures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with parent. Created 8 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: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 2c54cbca5a5ba525c2e2245490d2c5e855af1708..b224fc6f54e5de8a04a1b9d9fc7776c023ece1cf 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -324,7 +324,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// The chain of urls traversed by this request. If the request had no
// redirects, this vector will contain one element.
const std::vector<GURL>& url_chain() const { return url_chain_; }
- const GURL& url() const { return url_chain_.back(); }
+ const GURL& url() const {
+ return url_chain_.size() ? url_chain_.back() : GURL::EmptyGURL();
+ }
// The URL that should be consulted for the third-party cookie blocking
// policy.

Powered by Google App Engine
This is Rietveld 408576698