OLD | NEW |
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_PROFILE_AUTH_DATA_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PROFILE_AUTH_DATA_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include <string> |
| 9 #include "base/callback.h" |
9 | 10 |
10 class Profile; | 11 class Profile; |
11 | 12 |
12 namespace chromeos { | 13 namespace chromeos { |
13 | 14 |
14 // Helper class for transferring authentication related data from one profile | 15 // Helper class for transferring authentication related data from one profile |
15 // to another: proxy authentication cache, cookies, server bound certs. | 16 // to another: proxy authentication cache, cookies, server bound certs. |
16 class ProfileAuthData { | 17 class ProfileAuthData { |
17 public: | 18 public: |
18 // Transfers proxy authentication cache and optionally |transfer_cookies| and | 19 // Transfers proxy authentication cache and optionally |transfer_cookies| and |
19 // server bound certs from the profile that was used for authentication. | 20 // server bound certs from the profile that was used for authentication. |
20 static void Transfer(Profile* from_profile, | 21 // |cookies_transfered_callback| will be called on UI thread after cookie |
21 Profile* to_profile, | 22 // transfer part of this operation is completed. |
22 bool transfer_cookies); | 23 static void Transfer( |
| 24 Profile* from_profile, |
| 25 Profile* to_profile, |
| 26 bool transfer_cookies, |
| 27 const base::Callback<void()>& cookies_transfered_callback); |
| 28 |
23 private: | 29 private: |
24 DISALLOW_IMPLICIT_CONSTRUCTORS(ProfileAuthData); | 30 DISALLOW_IMPLICIT_CONSTRUCTORS(ProfileAuthData); |
25 }; | 31 }; |
26 | 32 |
27 } // namespace chromeos | 33 } // namespace chromeos |
28 | 34 |
29 #endif // CHROME_BROWSER_CHROMEOS_PROFILE_AUTH_DATA_H_ | 35 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PROFILE_AUTH_DATA_H_ |
OLD | NEW |