Index: components/signin/core/browser/signin_header_helper.h |
diff --git a/components/signin/core/browser/signin_header_helper.h b/components/signin/core/browser/signin_header_helper.h |
index 8d5d37c1fdcc523284ac89a205843ee7ce2fecc4..53d3797b798479f9cee8b1c04c50d82f4372d52e 100644 |
--- a/components/signin/core/browser/signin_header_helper.h |
+++ b/components/signin/core/browser/signin_header_helper.h |
@@ -30,6 +30,8 @@ enum ProfileMode { |
PROFILE_MODE_ADD_ACCOUNT_DISABLED = 1 << 1 |
}; |
+extern const char kChromeConnectedHeader[]; |
+ |
// The ServiceType specified by GAIA in the response header accompanying the 204 |
// response. This indicates the action Chrome is supposed to lead the user to |
// perform. |
@@ -73,6 +75,10 @@ struct ManageAccountsParams { |
bool SettingsAllowSigninCookies( |
const content_settings::CookieSettings* cookie_settings); |
+// Checks if the url has the required properties to have an |
+// X-CHROME-CONNECTED header. |
+bool IsUrlEligibleForXChromeConnectedHeader(const GURL& url); |
+ |
// Returns the X-CHROME-CONNECTED cookie, or an empty string if it should not be |
// added to the request to |url|. |
std::string BuildMirrorRequestCookieIfPossible( |
@@ -83,8 +89,8 @@ std::string BuildMirrorRequestCookieIfPossible( |
// Adds X-Chrome-Connected header to all Gaia requests from a connected profile, |
// with the exception of requests from gaia webview. |
-// Returns true if the account management header was added to the request. |
-bool AppendMirrorRequestHeaderIfPossible( |
+// Removes the header in case it should not be transfered to a redirected url. |
+bool AppendOrRemoveMirrorRequestHeaderIfPossible( |
net::URLRequest* request, |
const GURL& redirect_url, |
const std::string& account_id, |