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

Unified Diff: extensions/browser/api/web_request/web_request_api.cc

Issue 1297503004: Adding Null check in onAuthRequired() for handling FTP requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/web_request/web_request_api.cc
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index 6af34768b95d232b8dd1d8a90960d516a9c858a1..279276b638c99a7c4e75ed801ee3a6de9cd2f173 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -997,8 +997,9 @@ ExtensionWebRequestEventRouter::OnAuthRequired(
challenger->SetInteger(keys::kPortKey, auth_info.challenger.port());
dict->Set(keys::kChallengerKey, challenger);
dict->Set(keys::kStatusLineKey, GetStatusLine(request->response_headers()));
- dict->SetInteger(keys::kStatusCodeKey,
- request->response_headers()->response_code());
+ if (request->response_headers())
+ dict->SetInteger(keys::kStatusCodeKey,
+ request->response_headers()->response_code());
if (extra_info_spec & ExtraInfoSpec::RESPONSE_HEADERS) {
dict->Set(keys::kResponseHeadersKey,
GetResponseHeadersList(request->response_headers()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698