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_OAUTH2_LOGIN_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // OAuth2 specialization of OAuthLoginManager. | 28 // OAuth2 specialization of OAuthLoginManager. |
29 class OAuth2LoginManager : public OAuthLoginManager, | 29 class OAuth2LoginManager : public OAuthLoginManager, |
30 public content::NotificationObserver, | 30 public content::NotificationObserver, |
31 public OAuth2LoginVerifier::Delegate, | 31 public OAuth2LoginVerifier::Delegate, |
32 public OAuth2TokenFetcher::Delegate { | 32 public OAuth2TokenFetcher::Delegate { |
33 public: | 33 public: |
34 explicit OAuth2LoginManager(OAuthLoginManager::Delegate* delegate); | 34 explicit OAuth2LoginManager(OAuthLoginManager::Delegate* delegate); |
35 virtual ~OAuth2LoginManager(); | 35 virtual ~OAuth2LoginManager(); |
36 | 36 |
37 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 37 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
38 | 38 |
39 // OAuthLoginManager overrides. | 39 // OAuthLoginManager overrides. |
40 virtual void RestoreSession( | 40 virtual void RestoreSession( |
41 Profile* user_profile, | 41 Profile* user_profile, |
42 net::URLRequestContextGetter* auth_request_context, | 42 net::URLRequestContextGetter* auth_request_context, |
43 SessionRestoreStrategy restore_strategy, | 43 SessionRestoreStrategy restore_strategy, |
44 const std::string& oauth2_refresh_token, | 44 const std::string& oauth2_refresh_token, |
45 const std::string& auth_code) OVERRIDE; | 45 const std::string& auth_code) OVERRIDE; |
46 virtual void ContinueSessionRestore() OVERRIDE; | 46 virtual void ContinueSessionRestore() OVERRIDE; |
47 virtual void Stop() OVERRIDE; | 47 virtual void Stop() OVERRIDE; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 std::string refresh_token_; | 117 std::string refresh_token_; |
118 // Authorization code for fetching OAuth2 tokens. | 118 // Authorization code for fetching OAuth2 tokens. |
119 std::string auth_code_; | 119 std::string auth_code_; |
120 | 120 |
121 DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManager); | 121 DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManager); |
122 }; | 122 }; |
123 | 123 |
124 } // namespace chromeos | 124 } // namespace chromeos |
125 | 125 |
126 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ | 126 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ |
OLD | NEW |