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