Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / signin / signin_header_helper.h
blob685aeaaf0685335c975fe0d6a986b09ed13ab7e2
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_
8 namespace net {
9 class URLRequest;
11 class GURL;
12 class ProfileIOData;
14 // Utility functions for handling Chrome/Gaia headers during signin process.
15 // In the Mirror world, Chrome identity should always stay in sync with Gaia
16 // identity. Therefore Chrome needs to send Gaia special header for requests
17 // from a connected profile, so that Gaia can modify its response accordingly
18 // and let Chrome handles signin with native UI.
19 namespace signin {
21 // Add X-Chrome-Connected header to all Gaia requests from a connected profile,
22 // with the exception of requests from gaia webview. Must be called on IO
23 // thread.
24 void AppendMirrorRequestHeaderIfPossible(
25 net::URLRequest* request,
26 const GURL& redirect_url,
27 ProfileIOData* io_data,
28 int child_id,
29 int route_id);
31 // Looks for the X-Chrome-Manage-Accounts response header, and if found,
32 // tries to show the avatar bubble in the browser identified by the
33 // child/route id. Must be called on IO thread.
34 void ProcessMirrorResponseHeaderIfExists(
35 net::URLRequest* request,
36 ProfileIOData* io_data,
37 int child_id,
38 int route_id);
40 }; // namespace signin
42 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_