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

Side by Side Diff: chrome/browser/signin/android_profile_oauth2_token_service.h

Issue 617183003: Make sure GetAuthenticatedAccountId() returns a canonicalized id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_
6 #define CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 6 #define CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const std::string& access_token) override; 104 const std::string& access_token) override;
105 105
106 // Called to notify observers when a refresh token is available. 106 // Called to notify observers when a refresh token is available.
107 virtual void FireRefreshTokenAvailable( 107 virtual void FireRefreshTokenAvailable(
108 const std::string& account_id) override; 108 const std::string& account_id) override;
109 // Called to notify observers when a refresh token has been revoked. 109 // Called to notify observers when a refresh token has been revoked.
110 virtual void FireRefreshTokenRevoked(const std::string& account_id) override; 110 virtual void FireRefreshTokenRevoked(const std::string& account_id) override;
111 // Called to notify observers when refresh tokans have been loaded. 111 // Called to notify observers when refresh tokans have been loaded.
112 virtual void FireRefreshTokensLoaded() override; 112 virtual void FireRefreshTokensLoaded() override;
113 113
114 private:
114 // Return whether |signed_in_account| is valid and we have access 115 // Return whether |signed_in_account| is valid and we have access
115 // to all the tokens in |curr_account_ids|. If |force_notifications| is true, 116 // to all the tokens in |curr_account_ids|. If |force_notifications| is true,
116 // TokenAvailable notifications will be sent anyway, even if the account was 117 // TokenAvailable notifications will be sent anyway, even if the account was
117 // already known. 118 // already known.
118 bool ValidateAccounts(const std::string& signed_in_account, 119 bool ValidateAccounts(const std::string& signed_in_account,
119 const std::vector<std::string>& prev_account_ids, 120 const std::vector<std::string>& prev_account_ids,
120 const std::vector<std::string>& curr_account_ids, 121 const std::vector<std::string>& curr_account_ids,
121 std::vector<std::string>& refreshed_ids, 122 std::vector<std::string>& refreshed_ids,
122 std::vector<std::string>& revoked_ids, 123 std::vector<std::string>& revoked_ids,
123 bool force_notifications); 124 bool force_notifications);
124 125
125 private:
126 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 126 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
127 127
128 static bool is_testing_profile_; 128 static bool is_testing_profile_;
129 129
130 DISALLOW_COPY_AND_ASSIGN(AndroidProfileOAuth2TokenService); 130 DISALLOW_COPY_AND_ASSIGN(AndroidProfileOAuth2TokenService);
131 }; 131 };
132 132
133 #endif // CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 133 #endif // CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/services/gcm/fake_signin_manager.cc ('k') | chrome/browser/signin/android_profile_oauth2_token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698