Commit 62f395e2 authored by guohui@chromium.org's avatar guohui@chromium.org

Honor x-chrome header on non web triggerable transitions

Fixed a regression introduced in cl 488163003. Manual navigation, e.g. typing
url or clicking bookmark, is not considered user gesture. Thus with the cl
488163003, chrome will ignore x-chrome-manage-account header on manual
navigation to gaia endpoints. We should honor header on both non web
triggerable transitions and web triggerable transitions with user gesture.

BUG=394869

Review URL: https://codereview.chromium.org/481053003

Cr-Commit-Position: refs/heads/master@{#291518}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291518 0039d316-1c4b-4281-b951-d872f2087c98
parent cda71438
...@@ -256,7 +256,9 @@ void ProcessMirrorResponseHeaderIfExists( ...@@ -256,7 +256,9 @@ void ProcessMirrorResponseHeaderIfExists(
const content::ResourceRequestInfo* info = const content::ResourceRequestInfo* info =
content::ResourceRequestInfo::ForRequest(request); content::ResourceRequestInfo::ForRequest(request);
if (!(info && info->IsMainFrame() && info->HasUserGesture())) if (!(info && info->IsMainFrame() &&
(info->HasUserGesture() ||
!content::PageTransitionIsWebTriggerable(info->GetPageTransition()))))
return; return;
std::string header_value; std::string header_value;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment