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

Unified Diff: chrome/browser/signin/oauth2_token_service_delegate_android.h

Issue 1256283002: GAIA ID migration for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simple version Created 5 years, 4 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: chrome/browser/signin/oauth2_token_service_delegate_android.h
diff --git a/chrome/browser/signin/oauth2_token_service_delegate_android.h b/chrome/browser/signin/oauth2_token_service_delegate_android.h
index 8db8a5bfb5b161044c6d42628e9f561e0ea6eb72..fc6b640e9802437ec6205bd3c88f9be34b00145c 100644
--- a/chrome/browser/signin/oauth2_token_service_delegate_android.h
+++ b/chrome/browser/signin/oauth2_token_service_delegate_android.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
+#include "components/signin/core/browser/account_tracker_service.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "google_apis/gaia/google_service_auth_error.h"
#include "google_apis/gaia/oauth2_token_service_delegate.h"
@@ -43,7 +44,7 @@ class OAuth2TokenServiceDelegateAndroid : public OAuth2TokenServiceDelegate {
// accounts which requires special permission.
static void set_is_testing_profile() { is_testing_profile_ = true; }
- void Initialize();
+ void Initialize(AccountTrackerService* account_tracker_service);
// OAuth2TokenServiceDelegate overrides:
bool RefreshTokenIsAvailable(const std::string& account_id) const override;
@@ -85,6 +86,11 @@ class OAuth2TokenServiceDelegateAndroid : public OAuth2TokenServiceDelegate {
// OA2TService aware accounts.
void RevokeAllCredentials() override;
+ void SeedAccountsInfo(JNIEnv* env,
+ jobject obj,
+ jobjectArray gaiaids,
+ jobjectArray usernames);
+
protected:
friend class ProfileOAuth2TokenServiceFactory;
OAuth2TokenServiceDelegateAndroid();
@@ -110,6 +116,12 @@ class OAuth2TokenServiceDelegateAndroid : public OAuth2TokenServiceDelegate {
void FireRefreshTokensLoaded() override;
private:
+ std::vector<std::string> GetPersistentAccounts();
+ void ValidateAccountsWithOsTypeIds(const std::string& signed_in_account,
+ bool force_notifications);
+ std::string MapUserAccountIdToOs(const std::string& user_account_id) const;
+ std::string MapOsAccountIdToUser(const std::string& os_account_id) const;
+
// Return whether |signed_in_account| is valid and we have access
// to all the tokens in |curr_account_ids|. If |force_notifications| is true,
// TokenAvailable notifications will be sent anyway, even if the account was
@@ -123,6 +135,7 @@ class OAuth2TokenServiceDelegateAndroid : public OAuth2TokenServiceDelegate {
base::android::ScopedJavaGlobalRef<jobject> java_ref_;
+ AccountTrackerService* account_tracker_service_;
static bool is_testing_profile_;
DISALLOW_COPY_AND_ASSIGN(OAuth2TokenServiceDelegateAndroid);

Powered by Google App Engine
This is Rietveld 408576698