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

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

Issue 12052040: Added step that saves OAuth2 tokens fetched through policy into TokenService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/oauth2_login_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const GaiaAuthConsumer::ClientOAuthResult& oauth2_tokens) OVERRIDE; 69 const GaiaAuthConsumer::ClientOAuthResult& oauth2_tokens) OVERRIDE;
70 virtual void OnOAuth2TokensFetchFailed() OVERRIDE; 70 virtual void OnOAuth2TokensFetchFailed() OVERRIDE;
71 71
72 // Retrieves TokenService for |user_profile_| and sets up notification 72 // Retrieves TokenService for |user_profile_| and sets up notification
73 // observer events. 73 // observer events.
74 TokenService* SetupTokenService(); 74 TokenService* SetupTokenService();
75 75
76 // Removes legacy tokens form OAuth1 flow. 76 // Removes legacy tokens form OAuth1 flow.
77 void RemoveLegacyTokens(); 77 void RemoveLegacyTokens();
78 78
79 // Records OAuth2 tokens fetched through either policy fetcher or cookies-to-
80 // token exchange into TokenService.
81 void StoreOAuth2Tokens(
82 const GaiaAuthConsumer::ClientOAuthResult& oauth2_tokens);
83
79 // Loads previously stored OAuth2 tokens and kicks off its validation. 84 // Loads previously stored OAuth2 tokens and kicks off its validation.
80 void LoadAndVerifyOAuth2Tokens(); 85 void LoadAndVerifyOAuth2Tokens();
81 86
82 // Attempts to fetch OAuth2 tokens by using pre-authenticated cookie jar from 87 // Attempts to fetch OAuth2 tokens by using pre-authenticated cookie jar from
83 // provided |auth_profile|. 88 // provided |auth_profile|.
84 void FetchOAuth2Tokens(); 89 void FetchOAuth2Tokens();
85 90
86 // Reports when all tokens are loaded. 91 // Reports when all tokens are loaded.
87 void ReportOAuth2TokensLoaded(); 92 void ReportOAuth2TokensLoaded();
88 93
(...skipping 21 matching lines...) Expand all
110 scoped_ptr<OAuth2PolicyFetcher> oauth2_policy_fetcher_; 115 scoped_ptr<OAuth2PolicyFetcher> oauth2_policy_fetcher_;
111 // OAuth2 refresh token. 116 // OAuth2 refresh token.
112 std::string refresh_token_; 117 std::string refresh_token_;
113 118
114 DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManager); 119 DISALLOW_COPY_AND_ASSIGN(OAuth2LoginManager);
115 }; 120 };
116 121
117 } // namespace chromeos 122 } // namespace chromeos
118 123
119 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_ 124 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OAUTH2_LOGIN_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/oauth2_login_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698