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

Side by Side Diff: chrome/browser/extensions/api/identity/account_tracker.h

Issue 293063002: Multiple account support in chrome.identity.getAuthToken (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use full name of enable-new-profile-management Created 6 years, 6 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/extensions/api/identity/account_tracker.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void ReportAuthError(const std::string& account_key, 57 void ReportAuthError(const std::string& account_key,
58 const GoogleServiceAuthError& error); 58 const GoogleServiceAuthError& error);
59 59
60 void AddObserver(Observer* observer); 60 void AddObserver(Observer* observer);
61 void RemoveObserver(Observer* observer); 61 void RemoveObserver(Observer* observer);
62 62
63 // Returns the list of accounts that are signed in, and for which gaia IDs 63 // Returns the list of accounts that are signed in, and for which gaia IDs
64 // have been fetched. The primary account for the profile will be first 64 // have been fetched. The primary account for the profile will be first
65 // in the vector. Additional accounts will be in order of their gaia IDs. 65 // in the vector. Additional accounts will be in order of their gaia IDs.
66 std::vector<AccountIds> GetAccounts() const; 66 std::vector<AccountIds> GetAccounts() const;
67 std::string FindAccountKeyByGaiaId(const std::string& gaia_id);
67 68
68 // OAuth2TokenService::Observer implementation. 69 // OAuth2TokenService::Observer implementation.
69 virtual void OnRefreshTokenAvailable(const std::string& account_key) OVERRIDE; 70 virtual void OnRefreshTokenAvailable(const std::string& account_key) OVERRIDE;
70 virtual void OnRefreshTokenRevoked(const std::string& account_key) OVERRIDE; 71 virtual void OnRefreshTokenRevoked(const std::string& account_key) OVERRIDE;
71 72
72 void OnUserInfoFetchSuccess(AccountIdFetcher* fetcher, 73 void OnUserInfoFetchSuccess(AccountIdFetcher* fetcher,
73 const std::string& gaia_id); 74 const std::string& gaia_id);
74 void OnUserInfoFetchFailure(AccountIdFetcher* fetcher); 75 void OnUserInfoFetchFailure(AccountIdFetcher* fetcher);
75 76
76 // AuthStatusProvider implementation. 77 // AuthStatusProvider implementation.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 AccountTracker* tracker_; 144 AccountTracker* tracker_;
144 const std::string account_key_; 145 const std::string account_key_;
145 146
146 scoped_ptr<OAuth2TokenService::Request> login_token_request_; 147 scoped_ptr<OAuth2TokenService::Request> login_token_request_;
147 scoped_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_; 148 scoped_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_;
148 }; 149 };
149 150
150 } // namespace extensions 151 } // namespace extensions
151 152
152 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_ 153 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_ACCOUNT_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/account_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698