Index: content/browser/android/download_controller_android_impl.cc |
diff --git a/content/browser/android/download_controller_android_impl.cc b/content/browser/android/download_controller_android_impl.cc |
index 4da0615494ec2c51138a96bec41fa0f0a6484a7d..1e588bce7766fc69adb4a26f38d28c6a159f04d3 100644 |
--- a/content/browser/android/download_controller_android_impl.cc |
+++ b/content/browser/android/download_controller_android_impl.cc |
@@ -111,6 +111,10 @@ void DownloadControllerAndroidImpl::PrepareDownloadInfo( |
net::URLRequest* request = |
ResourceDispatcherHostImpl::Get()->GetURLRequest(global_id); |
DCHECK(request) << "Request to download not found."; |
Philippe
2012/12/17 15:20:06
Nit: I would remove these DCHECKs now that we are
felipeg
2012/12/17 15:21:33
Done.
|
+ if (!request) { |
+ LOG(ERROR) << "Request to download not found."; |
+ return; |
+ } |
DownloadInfoAndroid info_android(request); |
@@ -140,6 +144,10 @@ void DownloadControllerAndroidImpl::CheckPolicyAndLoadCookies( |
net::URLRequest* request = |
ResourceDispatcherHostImpl::Get()->GetURLRequest(global_id); |
DCHECK(request) << "Request to download not found."; |
+ if (!request) { |
+ LOG(ERROR) << "Request to download not found."; |
+ return; |
+ } |
if (request->context()->network_delegate()->CanGetCookies( |
*request, cookie_list)) { |
@@ -158,6 +166,10 @@ void DownloadControllerAndroidImpl::DoLoadCookies( |
net::URLRequest* request = |
ResourceDispatcherHostImpl::Get()->GetURLRequest(global_id); |
DCHECK(request) << "Request to download not found."; |
+ if (!request) { |
+ LOG(ERROR) << "Request to download not found."; |
+ return; |
+ } |
request->context()->cookie_store()->GetCookiesWithOptionsAsync( |
info.url, options, |