Fix a bug when an HttpTransactionFactory fails to create an HttpTransaction.
UrlRequestHttpJob would never send an error up to the UrlRequest, since it
assumed the lack of a transaction indicated the request had been cancelled.

This was causing sync to stop working during suspend.  The NetworkLayer was
failing to create an HttpNetworkTransaction while suspended, so sync would end
up waiting indefinitely on a hung request which it would never time out.

This was only seen by sync because it has no HttpCache layer, and the cache
layer never fails to create an HttpTransaction.

BUG=348475

Review URL: https://codereview.chromium.org/196643003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257258 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 044e5f0..7207777 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -770,9 +770,9 @@
   if (!request_)
     return;
 
-  // If the transaction was destroyed, then the job was cancelled, and
-  // we can just ignore this notification.
-  if (!transaction_.get())
+  // If the job is done (due to cancellation), can just ignore this
+  // notification.
+  if (done_)
     return;
 
   receive_headers_end_ = base::TimeTicks::Now();