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

Side by Side Diff: components/signin/core/browser/account_tracker_service.h

Issue 473153002: Inline sign in extracts gaia id from HTTP header and seeds account tracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // have been fetched. 72 // have been fetched.
73 std::vector<AccountInfo> GetAccounts() const; 73 std::vector<AccountInfo> GetAccounts() const;
74 AccountInfo GetAccountInfo(const std::string& account_id); 74 AccountInfo GetAccountInfo(const std::string& account_id);
75 AccountInfo FindAccountInfoByGaiaId(const std::string& gaia_id); 75 AccountInfo FindAccountInfoByGaiaId(const std::string& gaia_id);
76 AccountInfo FindAccountInfoByEmail(const std::string& email); 76 AccountInfo FindAccountInfoByEmail(const std::string& email);
77 77
78 // Indicates if all user information has been fetched. If the result is false, 78 // Indicates if all user information has been fetched. If the result is false,
79 // there are still unfininshed fetchers. 79 // there are still unfininshed fetchers.
80 virtual bool IsAllUserInfoFetched() const; 80 virtual bool IsAllUserInfoFetched() const;
81 81
82 // Picks the corect account_id for the specified account depending on the
bartfab (slow) 2014/10/14 17:12:38 Nit: s/corect/correct/
Roger Tawa OOO till Jul 10th 2014/10/16 02:39:32 Done.
83 // migration state.
84 std::string PickAccountIdForAccount(const std::string& gaia,
85 const std::string& email);
86 static std::string PickAccountIdForAccount(PrefService* pref_service,
87 const std::string& gaia,
88 const std::string& email);
89
90 // Seed the gaia id and email for the given account_id.
bartfab (slow) 2014/10/14 17:12:38 Nit: No |account_id| is being given here, so it is
guohui 2014/10/14 18:50:02 nits:s/Seed/Seeds/ maybe better to rename gaia to
Roger Tawa OOO till Jul 10th 2014/10/16 02:39:32 Fixed up the comment. Let me know if this is clea
bartfab (slow) 2014/10/17 09:54:55 The comment is clearer now, thanks. The logic is s
91 void SeedAccountInfo(const std::string& gaia, const std::string& email);
92
82 AccountIdMigrationState GetMigrationState(); 93 AccountIdMigrationState GetMigrationState();
83 static AccountIdMigrationState GetMigrationState(PrefService* pref_service); 94 static AccountIdMigrationState GetMigrationState(PrefService* pref_service);
84 95
85 private: 96 private:
86 friend class AccountInfoFetcher; 97 friend class AccountInfoFetcher;
87 98
88 // These methods are called by fetchers. 99 // These methods are called by fetchers.
89 void OnUserInfoFetchSuccess(AccountInfoFetcher* fetcher, 100 void OnUserInfoFetchSuccess(AccountInfoFetcher* fetcher,
90 const base::DictionaryValue* user_info); 101 const base::DictionaryValue* user_info);
91 void OnUserInfoFetchFailure(AccountInfoFetcher* fetcher); 102 void OnUserInfoFetchFailure(AccountInfoFetcher* fetcher);
(...skipping 28 matching lines...) Expand all
120 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 131 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
121 std::map<std::string, AccountInfoFetcher*> user_info_requests_; 132 std::map<std::string, AccountInfoFetcher*> user_info_requests_;
122 std::map<std::string, AccountState> accounts_; 133 std::map<std::string, AccountState> accounts_;
123 ObserverList<Observer> observer_list_; 134 ObserverList<Observer> observer_list_;
124 bool shutdown_called_; 135 bool shutdown_called_;
125 136
126 DISALLOW_COPY_AND_ASSIGN(AccountTrackerService); 137 DISALLOW_COPY_AND_ASSIGN(AccountTrackerService);
127 }; 138 };
128 139
129 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_ 140 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_TRACKER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698