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

Unified Diff: chrome/browser/signin/chrome_signin_helper.cc

Issue 2258483002: X-Chrome-Connected is stripped when it should not be in headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/browser/signin/chrome_signin_helper.cc
diff --git a/chrome/browser/signin/chrome_signin_helper.cc b/chrome/browser/signin/chrome_signin_helper.cc
index 6787db2f6026f1d4c358474b069de8e7e694bf78..613dfd09cefd227c337acee477690db9316005f3 100644
--- a/chrome/browser/signin/chrome_signin_helper.cc
+++ b/chrome/browser/signin/chrome_signin_helper.cc
@@ -118,7 +118,7 @@ ManageAccountsParams BuildManageAccountsParamsHelper(net::URLRequest* request,
} // namespace
-bool AppendMirrorRequestHeaderHelper(net::URLRequest* request,
+bool FixMirrorRequestHeaderHelper(net::URLRequest* request,
eroman 2016/08/23 20:02:36 style -- fix indentation
Ramin Halavati 2016/08/26 17:04:31 Done.
const GURL& redirect_url,
ProfileIOData* io_data,
int child_id,
@@ -148,9 +148,14 @@ bool AppendMirrorRequestHeaderHelper(net::URLRequest* request,
profile_mode_mask |= PROFILE_MODE_INCOGNITO_DISABLED;
}
- return AppendMirrorRequestHeaderIfPossible(
- request, redirect_url, io_data->google_services_account_id()->GetValue(),
- io_data->GetCookieSettings(), profile_mode_mask);
+ if (AppendMirrorRequestHeaderIfPossible(
+ request, redirect_url,
+ io_data->google_services_account_id()->GetValue(),
+ io_data->GetCookieSettings(), profile_mode_mask))
mmenke 2016/08/23 20:34:16 AppendMirrorRequestHeaderIfPossible seems problema
mmenke 2016/08/23 20:44:52 And this also assumes all Google.* TLDs are owned
Ramin Halavati 2016/08/26 17:04:31 I have added a test for content::IsOriginSecure an
Ramin Halavati 2016/08/26 17:04:31 I think this is a bigger issue of google_util::IsG
mmenke 2016/08/26 17:42:20 My feeling is that we should not rely on it for an
+ return true;
+
+ request->RemoveRequestHeaderByName(signin::kChromeConnectedHeader);
eroman 2016/08/23 20:02:36 This doesn't seem right. This code is called for
Ramin Halavati 2016/08/26 17:04:31 It's updated so that it is removed only when it is
+ return false;
}
void ProcessMirrorResponseHeaderIfExists(net::URLRequest* request,

Powered by Google App Engine
This is Rietveld 408576698