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

Unified Diff: components/signin/core/browser/signin_header_helper.cc

Issue 2319923002: Merge to M54: Check if response headers are empty in signin code (Closed)
Patch Set: Created 4 years, 3 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: components/signin/core/browser/signin_header_helper.cc
diff --git a/components/signin/core/browser/signin_header_helper.cc b/components/signin/core/browser/signin_header_helper.cc
index 578cb5806cf889ec323d359d175515b17120ffdd..8e946af395969f323286aa0bda98fad78963cc6a 100644
--- a/components/signin/core/browser/signin_header_helper.cc
+++ b/components/signin/core/browser/signin_header_helper.cc
@@ -215,7 +215,9 @@ ManageAccountsParams BuildManageAccountsParamsIfExists(net::URLRequest* request,
return empty_params;
std::string header_value;
- if (!request->response_headers()->GetNormalizedHeader(
+ net::HttpResponseHeaders* response_headers = request->response_headers();
+ if (!response_headers ||
+ !response_headers->GetNormalizedHeader(
kChromeManageAccountsHeader, &header_value)) {
return empty_params;
}
« 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