OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_OAUTH_LOGIN_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH_LOGIN_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH_LOGIN_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH_LOGIN_MANAGER_H_ |
7 | 7 |
8 #include <string> | |
9 | |
10 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/chromeos/cros/cert_library.h" | 10 #include "chrome/browser/chromeos/cros/cert_library.h" |
13 #include "chrome/browser/chromeos/cros/cros_library.h" | 11 #include "chrome/browser/chromeos/cros/cros_library.h" |
14 #include "chrome/browser/chromeos/login/oauth1_login_verifier.h" | 12 #include "chrome/browser/chromeos/login/oauth1_login_verifier.h" |
15 #include "chrome/browser/chromeos/login/oauth1_token_fetcher.h" | 13 #include "chrome/browser/chromeos/login/oauth1_token_fetcher.h" |
16 #include "chrome/browser/chromeos/login/oauth2_login_verifier.h" | 14 #include "chrome/browser/chromeos/login/oauth2_login_verifier.h" |
17 #include "chrome/browser/chromeos/login/oauth2_policy_fetcher.h" | 15 #include "chrome/browser/chromeos/login/oauth2_policy_fetcher.h" |
18 #include "chrome/browser/chromeos/login/oauth2_token_fetcher.h" | 16 #include "chrome/browser/chromeos/login/oauth2_token_fetcher.h" |
19 #include "chrome/browser/chromeos/login/policy_oauth_fetcher.h" | 17 #include "chrome/browser/chromeos/login/policy_oauth_fetcher.h" |
(...skipping 18 matching lines...) Expand all Loading... |
38 // stored OAuth tokens and populate cookie jar with GAIA credentials. | 36 // stored OAuth tokens and populate cookie jar with GAIA credentials. |
39 SESSION_RESTORE_IN_PROGRESS, | 37 SESSION_RESTORE_IN_PROGRESS, |
40 // Session restore is completed. | 38 // Session restore is completed. |
41 SESSION_RESTORE_DONE, | 39 SESSION_RESTORE_DONE, |
42 }; | 40 }; |
43 | 41 |
44 class Delegate { | 42 class Delegate { |
45 public: | 43 public: |
46 virtual ~Delegate() {} | 44 virtual ~Delegate() {} |
47 | 45 |
| 46 // Raised when merge session is completed. |
| 47 virtual void OnCompletedMergeSession() = 0; |
| 48 |
48 // Raised when cookie jar authentication is successfully completed. | 49 // Raised when cookie jar authentication is successfully completed. |
49 virtual void OnCompletedAuthentication(Profile* user_profile) = 0; | 50 virtual void OnCompletedAuthentication(Profile* user_profile) = 0; |
50 | 51 |
51 // Raised when stored OAuth(1|2) tokens are found and authentication | 52 // Raised when stored OAuth(1|2) tokens are found and authentication |
52 // profile is no longer needed. | 53 // profile is no longer needed. |
53 virtual void OnFoundStoredTokens() = 0; | 54 virtual void OnFoundStoredTokens() = 0; |
54 | 55 |
55 // Raised when policy tokens are retrieved. | 56 // Raised when policy tokens are retrieved. |
56 virtual void OnRestoredPolicyTokens() {} | 57 virtual void OnRestoredPolicyTokens() {} |
57 }; | 58 }; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 scoped_refptr<net::URLRequestContextGetter> auth_request_context_; | 93 scoped_refptr<net::URLRequestContextGetter> auth_request_context_; |
93 bool restore_from_auth_cookies_; | 94 bool restore_from_auth_cookies_; |
94 SessionRestoreState state_; | 95 SessionRestoreState state_; |
95 | 96 |
96 DISALLOW_COPY_AND_ASSIGN(OAuthLoginManager); | 97 DISALLOW_COPY_AND_ASSIGN(OAuthLoginManager); |
97 }; | 98 }; |
98 | 99 |
99 } // namespace chromeos | 100 } // namespace chromeos |
100 | 101 |
101 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH_LOGIN_MANAGER_H_ | 102 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH_LOGIN_MANAGER_H_ |
OLD | NEW |