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

Side by Side Diff: chrome/browser/chromeos/login/profile_auth_data.h

Issue 1021383002: cros: Transfer auth cookies for SAML webview sign-in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 10
11 namespace content { 11 namespace net {
12 class BrowserContext; 12 class URLRequestContextGetter;
13 } 13 }
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 // Helper class that transfers authentication-related data from a BrowserContext 17 // Helper class that transfers authentication-related data from a BrowserContext
18 // used for authentication to the user's actual BrowserContext. 18 // used for authentication to the user's actual BrowserContext.
19 class ProfileAuthData { 19 class ProfileAuthData {
20 public: 20 public:
21 // Transfers authentication-related data from |from_context| to |to_context| 21 // Transfers authentication-related data from |from_context| to |to_context|
22 // and invokes |completion_callback| on the UI thread when the operation has 22 // and invokes |completion_callback| on the UI thread when the operation has
23 // completed. The following data is transferred: 23 // completed. The following data is transferred:
24 // * The proxy authentication state. 24 // * The proxy authentication state.
25 // * All authentication cookies and channel IDs, if 25 // * All authentication cookies and channel IDs, if
26 // |transfer_auth_cookies_and_channel_ids_on_first_login| is true and 26 // |transfer_auth_cookies_and_channel_ids_on_first_login| is true and
27 // |to_context|'s cookie jar is empty. If the cookie jar is not empty, the 27 // |to_context|'s cookie jar is empty. If the cookie jar is not empty, the
28 // authentication states in |from_context| and |to_context| should be merged 28 // authentication states in |from_context| and |to_context| should be merged
29 // using /MergeSession instead. 29 // using /MergeSession instead.
30 // * The authentication cookies set by a SAML IdP, if 30 // * The authentication cookies set by a SAML IdP, if
31 // |transfer_saml_auth_cookies_on_subsequent_login| is true and 31 // |transfer_saml_auth_cookies_on_subsequent_login| is true and
32 // |to_context|'s cookie jar is not empty. 32 // |to_context|'s cookie jar is not empty.
33 static void Transfer( 33 static void Transfer(
34 content::BrowserContext* from_context, 34 net::URLRequestContextGetter* from_context,
35 content::BrowserContext* to_context, 35 net::URLRequestContextGetter* to_context,
36 bool transfer_auth_cookies_and_channel_ids_on_first_login, 36 bool transfer_auth_cookies_and_channel_ids_on_first_login,
37 bool transfer_saml_auth_cookies_on_subsequent_login, 37 bool transfer_saml_auth_cookies_on_subsequent_login,
38 const base::Closure& completion_callback); 38 const base::Closure& completion_callback);
39 39
40 private: 40 private:
41 DISALLOW_IMPLICIT_CONSTRUCTORS(ProfileAuthData); 41 DISALLOW_IMPLICIT_CONSTRUCTORS(ProfileAuthData);
42 }; 42 };
43 43
44 } // namespace chromeos 44 } // namespace chromeos
45 45
46 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_ 46 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698