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

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

Issue 1380103004: Delay fetching account info until OnRefreshTokensLoaded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SEEDING_TRACKER_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SEEDING_TRACKER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12 #include "build/build_config.h"
13
14 class AccountTrackerService;
15
16 // AccountSeedingTracker keeps track of accounts that need to be seeded
17 // partially. This is required on Android where the OS uses email as the
18 // identifier for accounts whereas Chrome uses the GAIA ID.
19 class AccountSeedingTracker {
anthonyvd 2015/10/05 16:05:50 Since this class is so incredibly Android-specific
knn 2015/10/05 16:35:55 You can think of this as dividing the AccountFetch
anthonyvd 2015/10/05 20:45:21 I see. Agreed that composition is better than inhe
20 public:
21 AccountSeedingTracker(const AccountTrackerService* account_tracker_service);
22 ~AccountSeedingTracker();
23
24 bool IsAccountSeeded(const std::string& account_id);
25 std::vector<std::string> GetNewlySeededAccounts();
26 bool AreAllAccountsSeeded() const;
27
28 private:
29 #if defined(OS_ANDROID)
30 std::vector<std::string> unseeded_accounts_;
31 const AccountTrackerService* account_tracker_service_;
32 #endif
33
34 DISALLOW_COPY_AND_ASSIGN(AccountSeedingTracker);
35 };
36
37 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SEEDING_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698