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

Side by Side Diff: ios/public/provider/chrome/browser/signin/chrome_identity_service.h

Issue 2970703002: Change GetAccessToken APIs so that they don't pass const ref to blocks. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | ios/public/provider/chrome/browser/signin/chrome_identity_service.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // authentication token. 150 // authentication token.
151 // This may be called on an arbitrary thread, but callback will always be on 151 // This may be called on an arbitrary thread, but callback will always be on
152 // the main thread. 152 // the main thread.
153 virtual void ForgetIdentity(ChromeIdentity* identity, 153 virtual void ForgetIdentity(ChromeIdentity* identity,
154 ForgetIdentityCallback callback); 154 ForgetIdentityCallback callback);
155 155
156 // Asynchronously retrieves access tokens for the given identity and scopes. 156 // Asynchronously retrieves access tokens for the given identity and scopes.
157 // Uses the default client id and client secret. 157 // Uses the default client id and client secret.
158 virtual void GetAccessToken(ChromeIdentity* identity, 158 virtual void GetAccessToken(ChromeIdentity* identity,
159 const std::set<std::string>& scopes, 159 const std::set<std::string>& scopes,
160 const AccessTokenCallback& callback); 160 AccessTokenCallback callback);
161 161
162 // Asynchronously retrieves access tokens for the given identity and scopes. 162 // Asynchronously retrieves access tokens for the given identity and scopes.
163 virtual void GetAccessToken(ChromeIdentity* identity, 163 virtual void GetAccessToken(ChromeIdentity* identity,
164 const std::string& client_id, 164 const std::string& client_id,
165 const std::string& client_secret, 165 const std::string& client_secret,
166 const std::set<std::string>& scopes, 166 const std::set<std::string>& scopes,
167 const AccessTokenCallback& callback); 167 AccessTokenCallback callback);
168 168
169 // Fetches the profile avatar, from the cache or the network. 169 // Fetches the profile avatar, from the cache or the network.
170 // For high resolution iPads, returns large images (200 x 200) to avoid 170 // For high resolution iPads, returns large images (200 x 200) to avoid
171 // pixelization. Calls back on the main thread. 171 // pixelization. Calls back on the main thread.
172 virtual void GetAvatarForIdentity(ChromeIdentity* identity, 172 virtual void GetAvatarForIdentity(ChromeIdentity* identity,
173 GetAvatarCallback callback); 173 GetAvatarCallback callback);
174 174
175 // Synchronously returns any cached avatar, or nil. 175 // Synchronously returns any cached avatar, or nil.
176 // GetAvatarForIdentity() should be generally used instead of this method. 176 // GetAvatarForIdentity() should be generally used instead of this method.
177 virtual UIImage* GetCachedAvatarForIdentity(ChromeIdentity* identity); 177 virtual UIImage* GetCachedAvatarForIdentity(ChromeIdentity* identity);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 private: 219 private:
220 base::ObserverList<Observer, true> observer_list_; 220 base::ObserverList<Observer, true> observer_list_;
221 221
222 DISALLOW_COPY_AND_ASSIGN(ChromeIdentityService); 222 DISALLOW_COPY_AND_ASSIGN(ChromeIdentityService);
223 }; 223 };
224 224
225 } // namespace ios 225 } // namespace ios
226 226
227 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_ 227 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_CHROME_IDENTITY_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | ios/public/provider/chrome/browser/signin/chrome_identity_service.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698