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

Unified 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: Defensive checks 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 side-by-side diff with in-line comments
Download patch
Index: components/signin/core/browser/account_seeding_tracker.h
diff --git a/components/signin/core/browser/account_seeding_tracker.h b/components/signin/core/browser/account_seeding_tracker.h
new file mode 100644
index 0000000000000000000000000000000000000000..27cfd8ced4d52d7a8d23c0a947a40eb0de1394a6
--- /dev/null
+++ b/components/signin/core/browser/account_seeding_tracker.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SEEDING_TRACKER_H_
+#define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SEEDING_TRACKER_H_
+
+#include <string>
+#include <vector>
+
+#include "base/macros.h"
+#include "build/build_config.h"
+
+class AccountTrackerService;
+
+// AccountSeedingTracker keeps track of accounts that need to be seeded
+// partially. This is required on Android where the OS uses email as the
+// identifier for accounts whereas Chrome uses the GAIA ID.
+class AccountSeedingTracker {
+ public:
+ AccountSeedingTracker(const AccountTrackerService* account_tracker_service);
+ ~AccountSeedingTracker();
+
+ bool IsAccountSeeded(const std::string& account_id);
+ std::vector<std::string> GetNewlySeededAccounts();
+ bool AreAllAccountsSeeded() const;
+
+ private:
+#if defined(OS_ANDROID)
+ std::vector<std::string> unseeded_accounts_;
+ const AccountTrackerService* account_tracker_service_;
+#endif
+
+ DISALLOW_COPY_AND_ASSIGN(AccountSeedingTracker);
+};
+
+#endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SEEDING_TRACKER_H_

Powered by Google App Engine
This is Rietveld 408576698