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

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: Addressed comments 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
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 118d9c8728d39d464bcd850abf325ab2c616c6c6..a0a4522f43509217aaaa110cac881d73497fb860 100644
--- a/chrome/browser/signin/chrome_signin_helper.cc
+++ b/chrome/browser/signin/chrome_signin_helper.cc
@@ -118,15 +118,15 @@ ManageAccountsParams BuildManageAccountsParamsHelper(net::URLRequest* request,
} // namespace
-bool AppendMirrorRequestHeaderHelper(net::URLRequest* request,
- const GURL& redirect_url,
- ProfileIOData* io_data,
- int child_id,
- int route_id) {
+void FixMirrorRequestHeaderHelper(net::URLRequest* request,
+ const GURL& redirect_url,
+ ProfileIOData* io_data,
+ int child_id,
+ int route_id) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
if (io_data->IsOffTheRecord())
- return false;
+ return;
#if !defined(OS_ANDROID)
extensions::WebViewRendererState::WebViewInfo webview_info;
@@ -138,7 +138,7 @@ bool AppendMirrorRequestHeaderHelper(net::URLRequest* request,
// gaia uses the header to decide whether it returns 204 for certain end
// points.
if (is_guest && webview_info.owner_host.empty())
- return false;
+ return;
#endif // !defined(OS_ANDROID)
int profile_mode_mask = PROFILE_MODE_DEFAULT;
@@ -148,7 +148,8 @@ bool AppendMirrorRequestHeaderHelper(net::URLRequest* request,
profile_mode_mask |= PROFILE_MODE_INCOGNITO_DISABLED;
}
- return AppendMirrorRequestHeaderIfPossible(
+ // If new url is eligible to have the header, add it, otherwise remove it.
+ AppendOrRemoveMirrorRequestHeaderIfPossible(
request, redirect_url, io_data->google_services_account_id()->GetValue(),
io_data->GetCookieSettings(), profile_mode_mask);
}

Powered by Google App Engine
This is Rietveld 408576698