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

Unified Diff: chrome/browser/signin/signin_header_helper.h

Issue 315773002: Parse the mirror response header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile Created 6 years, 7 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/signin/signin_header_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_header_helper.h
diff --git a/chrome/browser/signin/signin_header_helper.h b/chrome/browser/signin/signin_header_helper.h
index 2bb75f45f8e4f80bd278040e8a783640b7c6b599..b2b7dba6b11831ff422a1b9937fa9853b593f5a2 100644
--- a/chrome/browser/signin/signin_header_helper.h
+++ b/chrome/browser/signin/signin_header_helper.h
@@ -39,16 +39,30 @@ enum GAIAServiceType {
GAIA_SERVICE_TYPE_DEFAULT, // All other cases.
};
-// Add X-Chrome-Connected header to all Gaia requests from a connected profile,
+// Struct describing the paramters received in the manage account header.
+struct ManageAccountsParams {
+ GAIAServiceType service_type;
+};
+
+// Adds X-Chrome-Connected header to all Gaia requests from a connected profile,
// with the exception of requests from gaia webview. Must be called on IO
// thread.
-void AppendMirrorRequestHeaderIfPossible(
+// Returns true if the account management header was added to the request.
+bool AppendMirrorRequestHeaderIfPossible(
net::URLRequest* request,
const GURL& redirect_url,
ProfileIOData* io_data,
int child_id,
int route_id);
+// Returns the parameters contained in the X-Chrome-Manage-Accounts response
+// header.
+// If the request does not have a response header or if the header contains
+// garbage, then |service_type| is set to |GAIA_SERVICE_TYPE_NONE|.
+// Must be called on IO thread.
+ManageAccountsParams GetManageAccountsParams(net::URLRequest* request,
+ ProfileIOData* io_data);
+
// Looks for the X-Chrome-Manage-Accounts response header, and if found,
// tries to show the avatar bubble in the browser identified by the
// child/route id. Must be called on IO thread.
« no previous file with comments | « no previous file | chrome/browser/signin/signin_header_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698