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

Unified Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index e039ceba91e864dee4f61a398d8f9dd2bea238ef..bc8d974c05a46b49907bab0b74e34a4ce9f95984 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -472,9 +472,9 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
if (io_data->policy_header_helper())
io_data->policy_header_helper()->AddPolicyHeaders(request->url(), request);
- signin::AppendMirrorRequestHeaderHelper(request, GURL() /* redirect_url */,
- io_data, info->GetChildID(),
- info->GetRouteID());
+ signin::FixMirrorRequestHeaderHelper(request, GURL() /* redirect_url */,
+ io_data, info->GetChildID(),
+ info->GetRouteID());
AppendStandardResourceThrottles(request,
resource_context,
@@ -788,13 +788,14 @@ void ChromeResourceDispatcherHostDelegate::OnRequestRedirected(
const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
- // In the Mirror world, Chrome should append a X-Chrome-Connected header to
- // all Gaia requests from a connected profile so Gaia could return a 204
- // response and let Chrome handle the action with native UI. The only
- // exception is requests from gaia webview, since the native profile
- // management UI is built on top of it.
- signin::AppendMirrorRequestHeaderHelper(
- request, redirect_url, io_data, info->GetChildID(), info->GetRouteID());
+ // In the Mirror world (for users that are signed in to the browser on
+ // Android, the identity is mirrored into the content area), Chrome should
+ // append a X-Chrome-Connected header to all Gaia requests from a connected
+ // profile so Gaia could return a 204 response and let Chrome handle the
+ // action with native UI. The only exception is requests from gaia webview,
+ // since the native profile management UI is built on top of it.
+ signin::FixMirrorRequestHeaderHelper(request, redirect_url, io_data,
+ info->GetChildID(), info->GetRouteID());
if (io_data->resource_prefetch_predictor_observer()) {
io_data->resource_prefetch_predictor_observer()->OnRequestRedirected(
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698